Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
lucataco /stable-diffusion-x4-upscaler:c96e30cc
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/stable-diffusion-x4-upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/stable-diffusion-x4-upscaler:c96e30cc409e6c5f68cd8b071b15fe819b23956669fd6461891000ee64545760",
{
input: {
image: "https://replicate.delivery/pbxt/K3QUKRawkHNGZHZzEObxV5kXwWCBPrPOMgnglZw2BiCsBwQY/cat512.png",
scale: 4,
prompt: "A white cat"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run lucataco/stable-diffusion-x4-upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/stable-diffusion-x4-upscaler:c96e30cc409e6c5f68cd8b071b15fe819b23956669fd6461891000ee64545760",
input={
"image": "https://replicate.delivery/pbxt/K3QUKRawkHNGZHZzEObxV5kXwWCBPrPOMgnglZw2BiCsBwQY/cat512.png",
"scale": 4,
"prompt": "A white cat"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/stable-diffusion-x4-upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "c96e30cc409e6c5f68cd8b071b15fe819b23956669fd6461891000ee64545760",
"input": {
"image": "https://replicate.delivery/pbxt/K3QUKRawkHNGZHZzEObxV5kXwWCBPrPOMgnglZw2BiCsBwQY/cat512.png",
"scale": 4,
"prompt": "A white cat"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
Loading...
{
"completed_at": "2023-12-15T17:55:48.178757Z",
"created_at": "2023-12-15T17:55:11.354169Z",
"data_removed": false,
"error": null,
"id": "wnljkxzbse7f7n2io4kzvoeihi",
"input": {
"image": "https://replicate.delivery/pbxt/K3QUKRawkHNGZHZzEObxV5kXwWCBPrPOMgnglZw2BiCsBwQY/cat512.png",
"scale": 4,
"prompt": "A white cat"
},
"logs": "Downscaled image size: (512, 512)\n 0%| | 0/75 [00:00<?, ?it/s]\n 1%|▏ | 1/75 [00:00<00:30, 2.46it/s]\n 3%|▎ | 2/75 [00:00<00:28, 2.60it/s]\n 4%|▍ | 3/75 [00:01<00:27, 2.65it/s]\n 5%|▌ | 4/75 [00:01<00:26, 2.68it/s]\n 7%|▋ | 5/75 [00:01<00:26, 2.69it/s]\n 8%|▊ | 6/75 [00:02<00:25, 2.70it/s]\n 9%|▉ | 7/75 [00:02<00:25, 2.70it/s]\n 11%|█ | 8/75 [00:02<00:24, 2.71it/s]\n 12%|█▏ | 9/75 [00:03<00:24, 2.71it/s]\n 13%|█▎ | 10/75 [00:03<00:23, 2.71it/s]\n 15%|█▍ | 11/75 [00:04<00:23, 2.71it/s]\n 16%|█▌ | 12/75 [00:04<00:23, 2.71it/s]\n 17%|█▋ | 13/75 [00:04<00:22, 2.71it/s]\n 19%|█▊ | 14/75 [00:05<00:22, 2.71it/s]\n 20%|██ | 15/75 [00:05<00:22, 2.71it/s]\n 21%|██▏ | 16/75 [00:05<00:21, 2.71it/s]\n 23%|██▎ | 17/75 [00:06<00:21, 2.71it/s]\n 24%|██▍ | 18/75 [00:06<00:21, 2.71it/s]\n 25%|██▌ | 19/75 [00:07<00:20, 2.71it/s]\n 27%|██▋ | 20/75 [00:07<00:20, 2.71it/s]\n 28%|██▊ | 21/75 [00:07<00:19, 2.71it/s]\n 29%|██▉ | 22/75 [00:08<00:19, 2.71it/s]\n 31%|███ | 23/75 [00:08<00:19, 2.71it/s]\n 32%|███▏ | 24/75 [00:08<00:18, 2.71it/s]\n 33%|███▎ | 25/75 [00:09<00:18, 2.71it/s]\n 35%|███▍ | 26/75 [00:09<00:18, 2.71it/s]\n 36%|███▌ | 27/75 [00:09<00:17, 2.71it/s]\n 37%|███▋ | 28/75 [00:10<00:17, 2.71it/s]\n 39%|███▊ | 29/75 [00:10<00:16, 2.71it/s]\n 40%|████ | 30/75 [00:11<00:16, 2.71it/s]\n 41%|████▏ | 31/75 [00:11<00:16, 2.71it/s]\n 43%|████▎ | 32/75 [00:11<00:15, 2.71it/s]\n 44%|████▍ | 33/75 [00:12<00:15, 2.71it/s]\n 45%|████▌ | 34/75 [00:12<00:15, 2.71it/s]\n 47%|████▋ | 35/75 [00:12<00:14, 2.71it/s]\n 48%|████▊ | 36/75 [00:13<00:14, 2.71it/s]\n 49%|████▉ | 37/75 [00:13<00:14, 2.71it/s]\n 51%|█████ | 38/75 [00:14<00:13, 2.71it/s]\n 52%|█████▏ | 39/75 [00:14<00:13, 2.71it/s]\n 53%|█████▎ | 40/75 [00:14<00:12, 2.71it/s]\n 55%|█████▍ | 41/75 [00:15<00:12, 2.71it/s]\n 56%|█████▌ | 42/75 [00:15<00:12, 2.71it/s]\n 57%|█████▋ | 43/75 [00:15<00:11, 2.71it/s]\n 59%|█████▊ | 44/75 [00:16<00:11, 2.71it/s]\n 60%|██████ | 45/75 [00:16<00:11, 2.71it/s]\n 61%|██████▏ | 46/75 [00:17<00:10, 2.71it/s]\n 63%|██████▎ | 47/75 [00:17<00:10, 2.71it/s]\n 64%|██████▍ | 48/75 [00:17<00:09, 2.71it/s]\n 65%|██████▌ | 49/75 [00:18<00:09, 2.71it/s]\n 67%|██████▋ | 50/75 [00:18<00:09, 2.71it/s]\n 68%|██████▊ | 51/75 [00:18<00:08, 2.71it/s]\n 69%|██████▉ | 52/75 [00:19<00:08, 2.71it/s]\n 71%|███████ | 53/75 [00:19<00:08, 2.71it/s]\n 72%|███████▏ | 54/75 [00:19<00:07, 2.71it/s]\n 73%|███████▎ | 55/75 [00:20<00:07, 2.70it/s]\n 75%|███████▍ | 56/75 [00:20<00:07, 2.71it/s]\n 76%|███████▌ | 57/75 [00:21<00:06, 2.71it/s]\n 77%|███████▋ | 58/75 [00:21<00:06, 2.70it/s]\n 79%|███████▊ | 59/75 [00:21<00:05, 2.71it/s]\n 80%|████████ | 60/75 [00:22<00:05, 2.71it/s]\n 81%|████████▏ | 61/75 [00:22<00:05, 2.70it/s]\n 83%|████████▎ | 62/75 [00:22<00:04, 2.70it/s]\n 84%|████████▍ | 63/75 [00:23<00:04, 2.70it/s]\n 85%|████████▌ | 64/75 [00:23<00:04, 2.70it/s]\n 87%|████████▋ | 65/75 [00:24<00:03, 2.70it/s]\n 88%|████████▊ | 66/75 [00:24<00:03, 2.71it/s]\n 89%|████████▉ | 67/75 [00:24<00:02, 2.70it/s]\n 91%|█████████ | 68/75 [00:25<00:02, 2.70it/s]\n 92%|█████████▏| 69/75 [00:25<00:02, 2.70it/s]\n 93%|█████████▎| 70/75 [00:25<00:01, 2.70it/s]\n 95%|█████████▍| 71/75 [00:26<00:01, 2.70it/s]\n 96%|█████████▌| 72/75 [00:26<00:01, 2.70it/s]\n 97%|█████████▋| 73/75 [00:26<00:00, 2.70it/s]\n 99%|█████████▊| 74/75 [00:27<00:00, 2.70it/s]\n100%|██████████| 75/75 [00:27<00:00, 2.70it/s]\n100%|██████████| 75/75 [00:27<00:00, 2.70it/s]",
"metrics": {
"predict_time": 36.811203,
"total_time": 36.824588
},
"output": "https://replicate.delivery/pbxt/aHnTvlsIuPpefUQYHHuebBXvYey8obeuzsz2DInn3HSbkiUQC/upscaled.png",
"started_at": "2023-12-15T17:55:11.367554Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/wnljkxzbse7f7n2io4kzvoeihi",
"cancel": "https://api.replicate.com/v1/predictions/wnljkxzbse7f7n2io4kzvoeihi/cancel"
},
"version": "c96e30cc409e6c5f68cd8b071b15fe819b23956669fd6461891000ee64545760"
}
Downscaled image size: (512, 512)
0%| | 0/75 [00:00<?, ?it/s]
1%|▏ | 1/75 [00:00<00:30, 2.46it/s]
3%|▎ | 2/75 [00:00<00:28, 2.60it/s]
4%|▍ | 3/75 [00:01<00:27, 2.65it/s]
5%|▌ | 4/75 [00:01<00:26, 2.68it/s]
7%|▋ | 5/75 [00:01<00:26, 2.69it/s]
8%|▊ | 6/75 [00:02<00:25, 2.70it/s]
9%|▉ | 7/75 [00:02<00:25, 2.70it/s]
11%|█ | 8/75 [00:02<00:24, 2.71it/s]
12%|█▏ | 9/75 [00:03<00:24, 2.71it/s]
13%|█▎ | 10/75 [00:03<00:23, 2.71it/s]
15%|█▍ | 11/75 [00:04<00:23, 2.71it/s]
16%|█▌ | 12/75 [00:04<00:23, 2.71it/s]
17%|█▋ | 13/75 [00:04<00:22, 2.71it/s]
19%|█▊ | 14/75 [00:05<00:22, 2.71it/s]
20%|██ | 15/75 [00:05<00:22, 2.71it/s]
21%|██▏ | 16/75 [00:05<00:21, 2.71it/s]
23%|██▎ | 17/75 [00:06<00:21, 2.71it/s]
24%|██▍ | 18/75 [00:06<00:21, 2.71it/s]
25%|██▌ | 19/75 [00:07<00:20, 2.71it/s]
27%|██▋ | 20/75 [00:07<00:20, 2.71it/s]
28%|██▊ | 21/75 [00:07<00:19, 2.71it/s]
29%|██▉ | 22/75 [00:08<00:19, 2.71it/s]
31%|███ | 23/75 [00:08<00:19, 2.71it/s]
32%|███▏ | 24/75 [00:08<00:18, 2.71it/s]
33%|███▎ | 25/75 [00:09<00:18, 2.71it/s]
35%|███▍ | 26/75 [00:09<00:18, 2.71it/s]
36%|███▌ | 27/75 [00:09<00:17, 2.71it/s]
37%|███▋ | 28/75 [00:10<00:17, 2.71it/s]
39%|███▊ | 29/75 [00:10<00:16, 2.71it/s]
40%|████ | 30/75 [00:11<00:16, 2.71it/s]
41%|████▏ | 31/75 [00:11<00:16, 2.71it/s]
43%|████▎ | 32/75 [00:11<00:15, 2.71it/s]
44%|████▍ | 33/75 [00:12<00:15, 2.71it/s]
45%|████▌ | 34/75 [00:12<00:15, 2.71it/s]
47%|████▋ | 35/75 [00:12<00:14, 2.71it/s]
48%|████▊ | 36/75 [00:13<00:14, 2.71it/s]
49%|████▉ | 37/75 [00:13<00:14, 2.71it/s]
51%|█████ | 38/75 [00:14<00:13, 2.71it/s]
52%|█████▏ | 39/75 [00:14<00:13, 2.71it/s]
53%|█████▎ | 40/75 [00:14<00:12, 2.71it/s]
55%|█████▍ | 41/75 [00:15<00:12, 2.71it/s]
56%|█████▌ | 42/75 [00:15<00:12, 2.71it/s]
57%|█████▋ | 43/75 [00:15<00:11, 2.71it/s]
59%|█████▊ | 44/75 [00:16<00:11, 2.71it/s]
60%|██████ | 45/75 [00:16<00:11, 2.71it/s]
61%|██████▏ | 46/75 [00:17<00:10, 2.71it/s]
63%|██████▎ | 47/75 [00:17<00:10, 2.71it/s]
64%|██████▍ | 48/75 [00:17<00:09, 2.71it/s]
65%|██████▌ | 49/75 [00:18<00:09, 2.71it/s]
67%|██████▋ | 50/75 [00:18<00:09, 2.71it/s]
68%|██████▊ | 51/75 [00:18<00:08, 2.71it/s]
69%|██████▉ | 52/75 [00:19<00:08, 2.71it/s]
71%|███████ | 53/75 [00:19<00:08, 2.71it/s]
72%|███████▏ | 54/75 [00:19<00:07, 2.71it/s]
73%|███████▎ | 55/75 [00:20<00:07, 2.70it/s]
75%|███████▍ | 56/75 [00:20<00:07, 2.71it/s]
76%|███████▌ | 57/75 [00:21<00:06, 2.71it/s]
77%|███████▋ | 58/75 [00:21<00:06, 2.70it/s]
79%|███████▊ | 59/75 [00:21<00:05, 2.71it/s]
80%|████████ | 60/75 [00:22<00:05, 2.71it/s]
81%|████████▏ | 61/75 [00:22<00:05, 2.70it/s]
83%|████████▎ | 62/75 [00:22<00:04, 2.70it/s]
84%|████████▍ | 63/75 [00:23<00:04, 2.70it/s]
85%|████████▌ | 64/75 [00:23<00:04, 2.70it/s]
87%|████████▋ | 65/75 [00:24<00:03, 2.70it/s]
88%|████████▊ | 66/75 [00:24<00:03, 2.71it/s]
89%|████████▉ | 67/75 [00:24<00:02, 2.70it/s]
91%|█████████ | 68/75 [00:25<00:02, 2.70it/s]
92%|█████████▏| 69/75 [00:25<00:02, 2.70it/s]
93%|█████████▎| 70/75 [00:25<00:01, 2.70it/s]
95%|█████████▍| 71/75 [00:26<00:01, 2.70it/s]
96%|█████████▌| 72/75 [00:26<00:01, 2.70it/s]
97%|█████████▋| 73/75 [00:26<00:00, 2.70it/s]
99%|█████████▊| 74/75 [00:27<00:00, 2.70it/s]
100%|██████████| 75/75 [00:27<00:00, 2.70it/s]
100%|██████████| 75/75 [00:27<00:00, 2.70it/s]