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.
fermatresearch /sdxl-improved-refiner:58534db9
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run fermatresearch/sdxl-improved-refiner using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fermatresearch/sdxl-improved-refiner:58534db966a6866fa7e699482ebf8b508a8c39e197bb8ed7ce2d9b1e1cc6527e",
{
input: {
seed: 48373,
width: 1024,
height: 1024,
prompt: "A studio photo of a rainbow coloured cat",
refine: "expert_ensemble_refiner",
scheduler: "KarrasDPM",
lora_scale: 0.6,
num_outputs: 1,
tile_refine: true,
guidance_scale: 7.5,
apply_watermark: true,
high_noise_frac: 0.8,
negative_prompt: "",
prompt_strength: 0.8,
tile_refine_steps: 20,
num_inference_steps: 50,
tile_refine_strength: 0.5,
tile_refine_conditioning_strength: 0.5
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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 fermatresearch/sdxl-improved-refiner using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fermatresearch/sdxl-improved-refiner:58534db966a6866fa7e699482ebf8b508a8c39e197bb8ed7ce2d9b1e1cc6527e",
input={
"seed": 48373,
"width": 1024,
"height": 1024,
"prompt": "A studio photo of a rainbow coloured cat",
"refine": "expert_ensemble_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 0.6,
"num_outputs": 1,
"tile_refine": True,
"guidance_scale": 7.5,
"apply_watermark": True,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"tile_refine_steps": 20,
"num_inference_steps": 50,
"tile_refine_strength": 0.5,
"tile_refine_conditioning_strength": 0.5
}
)
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 fermatresearch/sdxl-improved-refiner 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": "fermatresearch/sdxl-improved-refiner:58534db966a6866fa7e699482ebf8b508a8c39e197bb8ed7ce2d9b1e1cc6527e",
"input": {
"seed": 48373,
"width": 1024,
"height": 1024,
"prompt": "A studio photo of a rainbow coloured cat",
"refine": "expert_ensemble_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 0.6,
"num_outputs": 1,
"tile_refine": true,
"guidance_scale": 7.5,
"apply_watermark": true,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"tile_refine_steps": 20,
"num_inference_steps": 50,
"tile_refine_strength": 0.5,
"tile_refine_conditioning_strength": 0.5
}
}' \
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
{
"completed_at": "2024-01-16T16:49:45.736839Z",
"created_at": "2024-01-16T16:49:31.281327Z",
"data_removed": false,
"error": null,
"id": "y5jiaztbhbn6aomtyu4bqsdioi",
"input": {
"seed": 48373,
"width": 1024,
"height": 1024,
"prompt": "A studio photo of a rainbow coloured cat",
"refine": "expert_ensemble_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 0.6,
"num_outputs": 1,
"tile_refine": true,
"guidance_scale": 7.5,
"apply_watermark": true,
"high_noise_frac": 0.8,
"prompt_strength": 0.8,
"tile_refine_steps": 20,
"num_inference_steps": 50,
"tile_refine_strength": 0.5,
"tile_refine_conditioning_strength": 0.5
},
"logs": "Using seed: 48373\nPrompt: A studio photo of a rainbow coloured cat\ntxt2img mode\n 0%| | 0/31 [00:00<?, ?it/s]\n 3%|▎ | 1/31 [00:00<00:05, 5.15it/s]\n 6%|▋ | 2/31 [00:00<00:04, 6.79it/s]\n 10%|▉ | 3/31 [00:00<00:04, 5.92it/s]\n 13%|█▎ | 4/31 [00:00<00:04, 5.58it/s]\n 16%|█▌ | 5/31 [00:00<00:04, 5.41it/s]\n 19%|█▉ | 6/31 [00:01<00:04, 5.30it/s]\n 23%|██▎ | 7/31 [00:01<00:04, 5.23it/s]\n 26%|██▌ | 8/31 [00:01<00:04, 5.19it/s]\n 29%|██▉ | 9/31 [00:01<00:04, 5.17it/s]\n 32%|███▏ | 10/31 [00:01<00:04, 5.15it/s]\n 35%|███▌ | 11/31 [00:02<00:03, 5.13it/s]\n 39%|███▊ | 12/31 [00:02<00:03, 5.12it/s]\n 42%|████▏ | 13/31 [00:02<00:03, 5.12it/s]\n 45%|████▌ | 14/31 [00:02<00:03, 5.12it/s]\n 48%|████▊ | 15/31 [00:02<00:03, 5.11it/s]\n 52%|█████▏ | 16/31 [00:03<00:02, 5.11it/s]\n 55%|█████▍ | 17/31 [00:03<00:02, 5.10it/s]\n 58%|█████▊ | 18/31 [00:03<00:02, 5.10it/s]\n 61%|██████▏ | 19/31 [00:03<00:02, 5.10it/s]\n 65%|██████▍ | 20/31 [00:03<00:02, 5.11it/s]\n 68%|██████▊ | 21/31 [00:04<00:01, 5.11it/s]\n 71%|███████ | 22/31 [00:04<00:01, 5.10it/s]\n 74%|███████▍ | 23/31 [00:04<00:01, 5.10it/s]\n 77%|███████▋ | 24/31 [00:04<00:01, 5.10it/s]\n 81%|████████ | 25/31 [00:04<00:01, 5.10it/s]\n 84%|████████▍ | 26/31 [00:05<00:00, 5.10it/s]\n 87%|████████▋ | 27/31 [00:05<00:00, 5.10it/s]\n 90%|█████████ | 28/31 [00:05<00:00, 5.09it/s]\n 94%|█████████▎| 29/31 [00:05<00:00, 5.09it/s]\n 97%|█████████▋| 30/31 [00:05<00:00, 5.09it/s]\n100%|██████████| 31/31 [00:05<00:00, 5.10it/s]\n100%|██████████| 31/31 [00:05<00:00, 5.17it/s]\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:02, 4.33it/s]\n 20%|██ | 2/10 [00:00<00:01, 4.31it/s]\n 30%|███ | 3/10 [00:00<00:01, 4.30it/s]\n 40%|████ | 4/10 [00:00<00:01, 4.29it/s]\n 50%|█████ | 5/10 [00:01<00:01, 4.28it/s]\n 60%|██████ | 6/10 [00:01<00:00, 4.29it/s]\n 70%|███████ | 7/10 [00:01<00:00, 4.29it/s]\n 80%|████████ | 8/10 [00:01<00:00, 4.29it/s]\n 90%|█████████ | 9/10 [00:02<00:00, 4.29it/s]\n100%|██████████| 10/10 [00:02<00:00, 4.29it/s]\n100%|██████████| 10/10 [00:02<00:00, 4.29it/s]\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:02, 3.06it/s]\n 20%|██ | 2/10 [00:00<00:01, 4.23it/s]\n 30%|███ | 3/10 [00:00<00:01, 3.61it/s]\n 40%|████ | 4/10 [00:01<00:01, 3.36it/s]\n 50%|█████ | 5/10 [00:01<00:01, 3.25it/s]\n 60%|██████ | 6/10 [00:01<00:01, 3.17it/s]\n 70%|███████ | 7/10 [00:02<00:00, 3.13it/s]\n 80%|████████ | 8/10 [00:02<00:00, 3.10it/s]\n 90%|█████████ | 9/10 [00:02<00:00, 3.09it/s]\n100%|██████████| 10/10 [00:03<00:00, 3.07it/s]\n100%|██████████| 10/10 [00:03<00:00, 3.20it/s]",
"metrics": {
"predict_time": 14.41882,
"total_time": 14.455512
},
"output": [
"https://replicate.delivery/pbxt/vKXf5iicWE1NPShzjR6rRYbdaDH6DMq22fPFSfLIuyrQtMakA/out-0.png"
],
"started_at": "2024-01-16T16:49:31.318019Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/y5jiaztbhbn6aomtyu4bqsdioi",
"cancel": "https://api.replicate.com/v1/predictions/y5jiaztbhbn6aomtyu4bqsdioi/cancel"
},
"version": "58534db966a6866fa7e699482ebf8b508a8c39e197bb8ed7ce2d9b1e1cc6527e"
}
Using seed: 48373
Prompt: A studio photo of a rainbow coloured cat
txt2img mode
0%| | 0/31 [00:00<?, ?it/s]
3%|▎ | 1/31 [00:00<00:05, 5.15it/s]
6%|▋ | 2/31 [00:00<00:04, 6.79it/s]
10%|▉ | 3/31 [00:00<00:04, 5.92it/s]
13%|█▎ | 4/31 [00:00<00:04, 5.58it/s]
16%|█▌ | 5/31 [00:00<00:04, 5.41it/s]
19%|█▉ | 6/31 [00:01<00:04, 5.30it/s]
23%|██▎ | 7/31 [00:01<00:04, 5.23it/s]
26%|██▌ | 8/31 [00:01<00:04, 5.19it/s]
29%|██▉ | 9/31 [00:01<00:04, 5.17it/s]
32%|███▏ | 10/31 [00:01<00:04, 5.15it/s]
35%|███▌ | 11/31 [00:02<00:03, 5.13it/s]
39%|███▊ | 12/31 [00:02<00:03, 5.12it/s]
42%|████▏ | 13/31 [00:02<00:03, 5.12it/s]
45%|████▌ | 14/31 [00:02<00:03, 5.12it/s]
48%|████▊ | 15/31 [00:02<00:03, 5.11it/s]
52%|█████▏ | 16/31 [00:03<00:02, 5.11it/s]
55%|█████▍ | 17/31 [00:03<00:02, 5.10it/s]
58%|█████▊ | 18/31 [00:03<00:02, 5.10it/s]
61%|██████▏ | 19/31 [00:03<00:02, 5.10it/s]
65%|██████▍ | 20/31 [00:03<00:02, 5.11it/s]
68%|██████▊ | 21/31 [00:04<00:01, 5.11it/s]
71%|███████ | 22/31 [00:04<00:01, 5.10it/s]
74%|███████▍ | 23/31 [00:04<00:01, 5.10it/s]
77%|███████▋ | 24/31 [00:04<00:01, 5.10it/s]
81%|████████ | 25/31 [00:04<00:01, 5.10it/s]
84%|████████▍ | 26/31 [00:05<00:00, 5.10it/s]
87%|████████▋ | 27/31 [00:05<00:00, 5.10it/s]
90%|█████████ | 28/31 [00:05<00:00, 5.09it/s]
94%|█████████▎| 29/31 [00:05<00:00, 5.09it/s]
97%|█████████▋| 30/31 [00:05<00:00, 5.09it/s]
100%|██████████| 31/31 [00:05<00:00, 5.10it/s]
100%|██████████| 31/31 [00:05<00:00, 5.17it/s]
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [00:00<00:02, 4.33it/s]
20%|██ | 2/10 [00:00<00:01, 4.31it/s]
30%|███ | 3/10 [00:00<00:01, 4.30it/s]
40%|████ | 4/10 [00:00<00:01, 4.29it/s]
50%|█████ | 5/10 [00:01<00:01, 4.28it/s]
60%|██████ | 6/10 [00:01<00:00, 4.29it/s]
70%|███████ | 7/10 [00:01<00:00, 4.29it/s]
80%|████████ | 8/10 [00:01<00:00, 4.29it/s]
90%|█████████ | 9/10 [00:02<00:00, 4.29it/s]
100%|██████████| 10/10 [00:02<00:00, 4.29it/s]
100%|██████████| 10/10 [00:02<00:00, 4.29it/s]
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [00:00<00:02, 3.06it/s]
20%|██ | 2/10 [00:00<00:01, 4.23it/s]
30%|███ | 3/10 [00:00<00:01, 3.61it/s]
40%|████ | 4/10 [00:01<00:01, 3.36it/s]
50%|█████ | 5/10 [00:01<00:01, 3.25it/s]
60%|██████ | 6/10 [00:01<00:01, 3.17it/s]
70%|███████ | 7/10 [00:02<00:00, 3.13it/s]
80%|████████ | 8/10 [00:02<00:00, 3.10it/s]
90%|█████████ | 9/10 [00:02<00:00, 3.09it/s]
100%|██████████| 10/10 [00:03<00:00, 3.07it/s]
100%|██████████| 10/10 [00:03<00:00, 3.20it/s]