replicate-predictions-downloader 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -12
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Replicate Predictions Downloader
|
|
1
|
+
# Replicate Predictions Downloader
|
|
2
2
|
|
|
3
3
|
A Node.js script to download and organize all your Replicate predictions, including images, metadata, and other outputs before they expire.
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
|
|
@@ -17,19 +17,31 @@ A Node.js script to download and organize all your Replicate predictions, includ
|
|
|
17
17
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
20
|
+
- Downloads all predictions from your Replicate account
|
|
21
|
+
- Organizes files by model and date
|
|
22
|
+
- Date filtering to avoid duplicate downloads
|
|
23
|
+
- Incremental downloads since last successful run
|
|
24
|
+
- Creates ZIP archives for each model (optional)
|
|
25
|
+
- Saves enhanced metadata for all predictions
|
|
26
|
+
- Shows detailed download statistics
|
|
27
|
+
- Preserves predictions before they expire
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx replicate-predictions-downloader --last-run
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You'll need your API token from [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) in the environment as `REPLICATE_API_TOKEN`.
|
|
28
36
|
|
|
29
37
|
## Why Use This Tool?
|
|
30
38
|
|
|
31
39
|
Replicate only stores your predictions temporarily. This tool helps you preserve your valuable work before it disappears, with intelligent organization to make your outputs easy to find later.
|
|
32
40
|
|
|
41
|
+
## Background
|
|
42
|
+
|
|
43
|
+
Replicate deletes predictions after 30 days. If you've been experimenting with models and want to keep your outputs - for portfolios, research, or just because you like them - you need to download them yourself. This tool does that, with some organization thrown in so you can actually find things later.
|
|
44
|
+
|
|
33
45
|
## Setup
|
|
34
46
|
|
|
35
47
|
### Prerequisites
|
|
@@ -88,6 +100,10 @@ node index.js
|
|
|
88
100
|
replicate-downloader
|
|
89
101
|
```
|
|
90
102
|
|
|
103
|
+
## What You'll See
|
|
104
|
+
|
|
105
|
+
When you run the tool, you'll see real-time progress as it fetches and downloads your predictions. The output includes details about what's being processed, download progress, and final statistics. Your files end up organized by model and date. There's also a metadata JSON if you're into that sort of thing.
|
|
106
|
+
|
|
91
107
|
### Date Filtering Options
|
|
92
108
|
|
|
93
109
|
Avoid duplicate downloads with intelligent date filtering:
|
|
@@ -202,6 +218,32 @@ The included .gitignore will help prevent this.
|
|
|
202
218
|
|
|
203
219
|
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
|
|
204
220
|
|
|
205
|
-
## Background
|
|
206
221
|
|
|
207
|
-
|
|
222
|
+
## Common Issues
|
|
223
|
+
|
|
224
|
+
**"Invalid API token" or "Authentication failed"**
|
|
225
|
+
- Double-check your token at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)
|
|
226
|
+
- Make sure you've set `REPLICATE_API_TOKEN` in your environment or `.env` file
|
|
227
|
+
- Try: `echo $REPLICATE_API_TOKEN` to verify it's set
|
|
228
|
+
|
|
229
|
+
**"Network timeout" or connection errors**
|
|
230
|
+
- Check your internet connection
|
|
231
|
+
- The tool automatically retries failed downloads
|
|
232
|
+
- For persistent issues, try running with fewer concurrent requests by editing the CONFIG object
|
|
233
|
+
|
|
234
|
+
**"Permission denied" or file errors**
|
|
235
|
+
- Ensure you have write permissions in the current directory
|
|
236
|
+
- On Windows, try running as administrator if needed
|
|
237
|
+
- Make sure you have enough disk space for your downloads
|
|
238
|
+
|
|
239
|
+
**"No new predictions found"**
|
|
240
|
+
- If using `--last-run`, this means you're up to date!
|
|
241
|
+
- Try `--since "1 week ago"` to see recent predictions
|
|
242
|
+
- Use `--all` to redownload everything (may create duplicates)
|
|
243
|
+
|
|
244
|
+
**Files have weird names or special characters**
|
|
245
|
+
- The tool automatically sanitizes filenames
|
|
246
|
+
- Prompts longer than the limit (default: 50 chars) are truncated
|
|
247
|
+
- Adjust `maxPromptLength` in CONFIG if needed
|
|
248
|
+
|
|
249
|
+
**Need help?** Check existing [GitHub issues](https://github.com/closestfriend/replicate-predictions-downloader/issues) or create a new one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replicate-predictions-downloader",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A Node.js script to download and organize all your Replicate predictions, including images, metadata, and other outputs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,14 @@
|
|
|
17
17
|
"predictions",
|
|
18
18
|
"organization",
|
|
19
19
|
"replicate-api",
|
|
20
|
-
"model-outputs"
|
|
20
|
+
"model-outputs",
|
|
21
|
+
"stable-diffusion",
|
|
22
|
+
"midjourney-alternative",
|
|
23
|
+
"ai-art",
|
|
24
|
+
"batch-download",
|
|
25
|
+
"backup",
|
|
26
|
+
"archive",
|
|
27
|
+
"cli"
|
|
21
28
|
],
|
|
22
29
|
"author": "closestfriend",
|
|
23
30
|
"license": "MIT",
|