Prediction
stability-ai/sdxl:c221b2b8Input
- width
- 768
- height
- 768
- prompt
- An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.
- refine
- expert_ensemble_refiner
- scheduler
- K_EULER
- lora_scale
- 0.6
- num_outputs
- 1
- guidance_scale
- 7.5
- apply_watermark
- high_noise_frac
- 0.8
- negative_prompt
- prompt_strength
- 0.8
- num_inference_steps
- 25
{
"width": 768,
"height": 768,
"prompt": "An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
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 stability-ai/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"stability-ai/sdxl:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
{
input: {
width: 768,
height: 768,
prompt: "An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.",
refine: "expert_ensemble_refiner",
scheduler: "K_EULER",
lora_scale: 0.6,
num_outputs: 1,
guidance_scale: 7.5,
apply_watermark: false,
high_noise_frac: 0.8,
negative_prompt: "",
prompt_strength: 0.8,
num_inference_steps: 25
}
}
);
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 stability-ai/sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/sdxl:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
input={
"width": 768,
"height": 768,
"prompt": "An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": False,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
)
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 stability-ai/sdxl 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": "c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316",
"input": {
"width": 768,
"height": 768,
"prompt": "An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/stability-ai/sdxl@sha256:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316 \
-i 'width=768' \
-i 'height=768' \
-i 'prompt="An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds."' \
-i 'refine="expert_ensemble_refiner"' \
-i 'scheduler="K_EULER"' \
-i 'lora_scale=0.6' \
-i 'num_outputs=1' \
-i 'guidance_scale=7.5' \
-i 'apply_watermark=false' \
-i 'high_noise_frac=0.8' \
-i 'negative_prompt=""' \
-i 'prompt_strength=0.8' \
-i 'num_inference_steps=25'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/stability-ai/sdxl@sha256:c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 768, "height": 768, "prompt": "An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.", "refine": "expert_ensemble_refiner", "scheduler": "K_EULER", "lora_scale": 0.6, "num_outputs": 1, "guidance_scale": 7.5, "apply_watermark": false, "high_noise_frac": 0.8, "negative_prompt": "", "prompt_strength": 0.8, "num_inference_steps": 25 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{
"completed_at": "2023-10-22T21:22:36.441157Z",
"created_at": "2023-10-22T21:22:25.704407Z",
"data_removed": false,
"error": null,
"id": "5rocea3bydhhnl7yrip7kfydgu",
"input": {
"width": 768,
"height": 768,
"prompt": "An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.",
"refine": "expert_ensemble_refiner",
"scheduler": "K_EULER",
"lora_scale": 0.6,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "",
"prompt_strength": 0.8,
"num_inference_steps": 25
},
"logs": "Using seed: 54670\nPrompt: An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.\ntxt2img mode\n 0%| | 0/16 [00:00<?, ?it/s]\n 6%|▋ | 1/16 [00:00<00:01, 8.14it/s]\n 12%|█▎ | 2/16 [00:00<00:01, 8.03it/s]\n 19%|█▉ | 3/16 [00:00<00:01, 8.01it/s]\n 25%|██▌ | 4/16 [00:00<00:01, 7.99it/s]\n 31%|███▏ | 5/16 [00:00<00:01, 8.00it/s]\n 38%|███▊ | 6/16 [00:00<00:01, 7.98it/s]\n 44%|████▍ | 7/16 [00:00<00:01, 7.98it/s]\n 50%|█████ | 8/16 [00:01<00:01, 7.96it/s]\n 56%|█████▋ | 9/16 [00:01<00:00, 7.96it/s]\n 62%|██████▎ | 10/16 [00:01<00:00, 7.97it/s]\n 69%|██████▉ | 11/16 [00:01<00:00, 7.95it/s]\n 75%|███████▌ | 12/16 [00:01<00:00, 7.95it/s]\n 81%|████████▏ | 13/16 [00:01<00:00, 7.96it/s]\n 88%|████████▊ | 14/16 [00:01<00:00, 7.96it/s]\n 94%|█████████▍| 15/16 [00:01<00:00, 7.95it/s]\n100%|██████████| 16/16 [00:02<00:00, 7.96it/s]\n100%|██████████| 16/16 [00:02<00:00, 7.97it/s]\n 0%| | 0/5 [00:00<?, ?it/s]\n 20%|██ | 1/5 [00:00<00:00, 7.74it/s]\n 40%|████ | 2/5 [00:00<00:00, 7.66it/s]\n 60%|██████ | 3/5 [00:00<00:00, 7.65it/s]\n 80%|████████ | 4/5 [00:00<00:00, 7.61it/s]\n100%|██████████| 5/5 [00:00<00:00, 7.59it/s]\n100%|██████████| 5/5 [00:00<00:00, 7.61it/s]",
"metrics": {
"predict_time": 4.885174,
"total_time": 10.73675
},
"output": [
"https://pbxt.replicate.delivery/LWURDvWtfGQpVCRsSMzSf2fHVCezMrjw4475ww3fFif2mENcE/out-0.png"
],
"started_at": "2023-10-22T21:22:31.555983Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/5rocea3bydhhnl7yrip7kfydgu",
"cancel": "https://api.replicate.com/v1/predictions/5rocea3bydhhnl7yrip7kfydgu/cancel"
},
"version": "c221b2b8ef527988fb59bf24a8b97c4561f1c671f73bd389f866bfb27c061316"
}
Using seed: 54670
Prompt: An image of determined, space explorer, repairing a broken spaceship engine, cyberpunk style, detailed, realistic, trending on artstation, in style of Ben Folds.
txt2img mode
0%| | 0/16 [00:00<?, ?it/s]
6%|▋ | 1/16 [00:00<00:01, 8.14it/s]
12%|█▎ | 2/16 [00:00<00:01, 8.03it/s]
19%|█▉ | 3/16 [00:00<00:01, 8.01it/s]
25%|██▌ | 4/16 [00:00<00:01, 7.99it/s]
31%|███▏ | 5/16 [00:00<00:01, 8.00it/s]
38%|███▊ | 6/16 [00:00<00:01, 7.98it/s]
44%|████▍ | 7/16 [00:00<00:01, 7.98it/s]
50%|█████ | 8/16 [00:01<00:01, 7.96it/s]
56%|█████▋ | 9/16 [00:01<00:00, 7.96it/s]
62%|██████▎ | 10/16 [00:01<00:00, 7.97it/s]
69%|██████▉ | 11/16 [00:01<00:00, 7.95it/s]
75%|███████▌ | 12/16 [00:01<00:00, 7.95it/s]
81%|████████▏ | 13/16 [00:01<00:00, 7.96it/s]
88%|████████▊ | 14/16 [00:01<00:00, 7.96it/s]
94%|█████████▍| 15/16 [00:01<00:00, 7.95it/s]
100%|██████████| 16/16 [00:02<00:00, 7.96it/s]
100%|██████████| 16/16 [00:02<00:00, 7.97it/s]
0%| | 0/5 [00:00<?, ?it/s]
20%|██ | 1/5 [00:00<00:00, 7.74it/s]
40%|████ | 2/5 [00:00<00:00, 7.66it/s]
60%|██████ | 3/5 [00:00<00:00, 7.65it/s]
80%|████████ | 4/5 [00:00<00:00, 7.61it/s]
100%|██████████| 5/5 [00:00<00:00, 7.59it/s]
100%|██████████| 5/5 [00:00<00:00, 7.61it/s]