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/K3QScDT9LGCqNO3ovXk1vfbq8KCpl8Va4UVwLCo9EOtXPqFm/cat.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/K3QScDT9LGCqNO3ovXk1vfbq8KCpl8Va4UVwLCo9EOtXPqFm/cat.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/K3QScDT9LGCqNO3ovXk1vfbq8KCpl8Va4UVwLCo9EOtXPqFm/cat.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
We were unable to load these images. Please make sure the URLs are valid.
{ "input": "https://replicate.delivery/pbxt/K3QScDT9LGCqNO3ovXk1vfbq8KCpl8Va4UVwLCo9EOtXPqFm/cat.png", "outut": "https://replicate.delivery/pbxt/fgWy0KTVQwyPIiBgv8A40GvLdpJlfIEo8enPkKRUFLfbPRKIB/upscaled.png" }
{
"completed_at": "2023-12-15T17:55:02.716497Z",
"created_at": "2023-12-15T17:53:24.109173Z",
"data_removed": false,
"error": null,
"id": "4fgwdczbguymz4s6tgf4ipl2iq",
"input": {
"image": "https://replicate.delivery/pbxt/K3QScDT9LGCqNO3ovXk1vfbq8KCpl8Va4UVwLCo9EOtXPqFm/cat.png",
"scale": 4,
"prompt": "A white cat"
},
"logs": "Downscaled image size: (128, 128)\n 0%| | 0/75 [00:00<?, ?it/s]\n 1%|▏ | 1/75 [00:00<00:47, 1.55it/s]\n 5%|▌ | 4/75 [00:00<00:11, 6.30it/s]\n 9%|▉ | 7/75 [00:00<00:06, 10.41it/s]\n 13%|█▎ | 10/75 [00:01<00:04, 13.88it/s]\n 17%|█▋ | 13/75 [00:01<00:03, 16.62it/s]\n 21%|██▏ | 16/75 [00:01<00:03, 18.80it/s]\n 25%|██▌ | 19/75 [00:01<00:02, 19.89it/s]\n 29%|██▉ | 22/75 [00:01<00:02, 21.15it/s]\n 33%|███▎ | 25/75 [00:01<00:02, 22.01it/s]\n 37%|███▋ | 28/75 [00:01<00:02, 22.54it/s]\n 41%|████▏ | 31/75 [00:01<00:01, 23.00it/s]\n 45%|████▌ | 34/75 [00:02<00:01, 23.31it/s]\n 49%|████▉ | 37/75 [00:02<00:01, 23.49it/s]\n 53%|█████▎ | 40/75 [00:02<00:01, 23.58it/s]\n 57%|█████▋ | 43/75 [00:02<00:01, 22.87it/s]\n 61%|██████▏ | 46/75 [00:02<00:01, 22.73it/s]\n 65%|██████▌ | 49/75 [00:02<00:01, 23.10it/s]\n 69%|██████▉ | 52/75 [00:02<00:00, 23.36it/s]\n 73%|███████▎ | 55/75 [00:02<00:00, 23.60it/s]\n 77%|███████▋ | 58/75 [00:03<00:00, 23.82it/s]\n 81%|████████▏ | 61/75 [00:03<00:00, 23.87it/s]\n 85%|████████▌ | 64/75 [00:03<00:00, 24.05it/s]\n 89%|████████▉ | 67/75 [00:03<00:00, 24.06it/s]\n 93%|█████████▎| 70/75 [00:03<00:00, 22.99it/s]\n 97%|█████████▋| 73/75 [00:03<00:00, 23.26it/s]\n100%|██████████| 75/75 [00:03<00:00, 19.85it/s]",
"metrics": {
"predict_time": 5.446678,
"total_time": 98.607324
},
"output": "https://replicate.delivery/pbxt/fgWy0KTVQwyPIiBgv8A40GvLdpJlfIEo8enPkKRUFLfbPRKIB/upscaled.png",
"started_at": "2023-12-15T17:54:57.269819Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/4fgwdczbguymz4s6tgf4ipl2iq",
"cancel": "https://api.replicate.com/v1/predictions/4fgwdczbguymz4s6tgf4ipl2iq/cancel"
},
"version": "c96e30cc409e6c5f68cd8b071b15fe819b23956669fd6461891000ee64545760"
}
Downscaled image size: (128, 128)
0%| | 0/75 [00:00<?, ?it/s]
1%|▏ | 1/75 [00:00<00:47, 1.55it/s]
5%|▌ | 4/75 [00:00<00:11, 6.30it/s]
9%|▉ | 7/75 [00:00<00:06, 10.41it/s]
13%|█▎ | 10/75 [00:01<00:04, 13.88it/s]
17%|█▋ | 13/75 [00:01<00:03, 16.62it/s]
21%|██▏ | 16/75 [00:01<00:03, 18.80it/s]
25%|██▌ | 19/75 [00:01<00:02, 19.89it/s]
29%|██▉ | 22/75 [00:01<00:02, 21.15it/s]
33%|███▎ | 25/75 [00:01<00:02, 22.01it/s]
37%|███▋ | 28/75 [00:01<00:02, 22.54it/s]
41%|████▏ | 31/75 [00:01<00:01, 23.00it/s]
45%|████▌ | 34/75 [00:02<00:01, 23.31it/s]
49%|████▉ | 37/75 [00:02<00:01, 23.49it/s]
53%|█████▎ | 40/75 [00:02<00:01, 23.58it/s]
57%|█████▋ | 43/75 [00:02<00:01, 22.87it/s]
61%|██████▏ | 46/75 [00:02<00:01, 22.73it/s]
65%|██████▌ | 49/75 [00:02<00:01, 23.10it/s]
69%|██████▉ | 52/75 [00:02<00:00, 23.36it/s]
73%|███████▎ | 55/75 [00:02<00:00, 23.60it/s]
77%|███████▋ | 58/75 [00:03<00:00, 23.82it/s]
81%|████████▏ | 61/75 [00:03<00:00, 23.87it/s]
85%|████████▌ | 64/75 [00:03<00:00, 24.05it/s]
89%|████████▉ | 67/75 [00:03<00:00, 24.06it/s]
93%|█████████▎| 70/75 [00:03<00:00, 22.99it/s]
97%|█████████▋| 73/75 [00:03<00:00, 23.26it/s]
100%|██████████| 75/75 [00:03<00:00, 19.85it/s]