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.
stability-ai /stable-diffusion:27b93a24
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 stability-ai/stable-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"stability-ai/stable-diffusion:27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478",
{
input: {
width: 512,
height: 512,
prompt: "Ragdoll cat king wearing a golden crown, intricate, elegant, highly detailed, centered, digital painting, artstation, concept art, smooth, sharp focus, illustration, artgerm, Tomasz Alen Kopera, Peter Mohrbacher, donato giancola, Joseph Christian Leyendecker, WLOP, Boris Vallejo",
scheduler: "K_EULER_ANCESTRAL",
num_outputs: 1,
guidance_scale: 7.5,
negative_prompt: "yellow color, nose",
prompt_strength: 0.8,
num_inference_steps: 30
}
}
);
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/stable-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/stable-diffusion:27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478",
input={
"width": 512,
"height": 512,
"prompt": "Ragdoll cat king wearing a golden crown, intricate, elegant, highly detailed, centered, digital painting, artstation, concept art, smooth, sharp focus, illustration, artgerm, Tomasz Alen Kopera, Peter Mohrbacher, donato giancola, Joseph Christian Leyendecker, WLOP, Boris Vallejo",
"scheduler": "K_EULER_ANCESTRAL",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "yellow color, nose",
"prompt_strength": 0.8,
"num_inference_steps": 30
}
)
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/stable-diffusion 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": "27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478",
"input": {
"width": 512,
"height": 512,
"prompt": "Ragdoll cat king wearing a golden crown, intricate, elegant, highly detailed, centered, digital painting, artstation, concept art, smooth, sharp focus, illustration, artgerm, Tomasz Alen Kopera, Peter Mohrbacher, donato giancola, Joseph Christian Leyendecker, WLOP, Boris Vallejo",
"scheduler": "K_EULER_ANCESTRAL",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "yellow color, nose",
"prompt_strength": 0.8,
"num_inference_steps": 30
}
}' \
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": "2022-11-22T23:15:24.895155Z",
"created_at": "2022-11-22T23:15:22.302509Z",
"data_removed": false,
"error": null,
"id": "4irm2hlalvdmlkryu4df63pwnq",
"input": {
"width": 512,
"height": 512,
"prompt": "Ragdoll cat king wearing a golden crown, intricate, elegant, highly detailed, centered, digital painting, artstation, concept art, smooth, sharp focus, illustration, artgerm, Tomasz Alen Kopera, Peter Mohrbacher, donato giancola, Joseph Christian Leyendecker, WLOP, Boris Vallejo",
"scheduler": "K_EULER_ANCESTRAL",
"num_outputs": "1",
"guidance_scale": 7.5,
"negative_prompt": "yellow color, nose",
"prompt_strength": 0.8,
"num_inference_steps": "30"
},
"logs": "Using seed: 55251\n 0%| | 0/30 [00:00<?, ?it/s]\n 7%|▋ | 2/30 [00:00<00:02, 13.41it/s]\n 13%|█▎ | 4/30 [00:00<00:01, 13.90it/s]\n 20%|██ | 6/30 [00:00<00:01, 13.63it/s]\n 27%|██▋ | 8/30 [00:00<00:01, 13.90it/s]\n 33%|███▎ | 10/30 [00:00<00:01, 14.11it/s]\n 40%|████ | 12/30 [00:00<00:01, 14.27it/s]\n 47%|████▋ | 14/30 [00:00<00:01, 14.26it/s]\n 53%|█████▎ | 16/30 [00:01<00:00, 14.44it/s]\n 60%|██████ | 18/30 [00:01<00:00, 14.55it/s]\n 67%|██████▋ | 20/30 [00:01<00:00, 14.66it/s]\n 73%|███████▎ | 22/30 [00:01<00:00, 14.68it/s]\n 80%|████████ | 24/30 [00:01<00:00, 14.74it/s]\n 87%|████████▋ | 26/30 [00:01<00:00, 14.78it/s]\n 93%|█████████▎| 28/30 [00:01<00:00, 14.74it/s]\n100%|██████████| 30/30 [00:02<00:00, 14.53it/s]\n100%|██████████| 30/30 [00:02<00:00, 14.41it/s]",
"metrics": {
"predict_time": 2.56023,
"total_time": 2.592646
},
"output": [
"https://replicate.delivery/pbxt/aooDunhAPcbUBh979fEblu4qqohEtlG0dPJUf1aLuUkMowCQA/out-0.png"
],
"started_at": "2022-11-22T23:15:22.334925Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/4irm2hlalvdmlkryu4df63pwnq",
"cancel": "https://api.replicate.com/v1/predictions/4irm2hlalvdmlkryu4df63pwnq/cancel"
},
"version": "27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478"
}
Using seed: 55251
0%| | 0/30 [00:00<?, ?it/s]
7%|▋ | 2/30 [00:00<00:02, 13.41it/s]
13%|█▎ | 4/30 [00:00<00:01, 13.90it/s]
20%|██ | 6/30 [00:00<00:01, 13.63it/s]
27%|██▋ | 8/30 [00:00<00:01, 13.90it/s]
33%|███▎ | 10/30 [00:00<00:01, 14.11it/s]
40%|████ | 12/30 [00:00<00:01, 14.27it/s]
47%|████▋ | 14/30 [00:00<00:01, 14.26it/s]
53%|█████▎ | 16/30 [00:01<00:00, 14.44it/s]
60%|██████ | 18/30 [00:01<00:00, 14.55it/s]
67%|██████▋ | 20/30 [00:01<00:00, 14.66it/s]
73%|███████▎ | 22/30 [00:01<00:00, 14.68it/s]
80%|████████ | 24/30 [00:01<00:00, 14.74it/s]
87%|████████▋ | 26/30 [00:01<00:00, 14.78it/s]
93%|█████████▎| 28/30 [00:01<00:00, 14.74it/s]
100%|██████████| 30/30 [00:02<00:00, 14.53it/s]
100%|██████████| 30/30 [00:02<00:00, 14.41it/s]