You're looking at a specific version of this model. Jump to the model overview.
lambdal /stable-diffusion-image-variation:7c399ba0
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport 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 lambdal/stable-diffusion-image-variation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lambdal/stable-diffusion-image-variation:7c399ba0e1b33ed8ec39ed30eb6b0a2d9e054462543c428c251293034af82a8e",
{
input: {
input_image: "https://replicate.delivery/pbxt/Hx7Lz9S1R56PHHotowtxAqDL8QYcB3pcb9qLUxM2zjA59J8d/ghibli.jpg",
num_outputs: 1,
guidance_scale: 5,
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 variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run lambdal/stable-diffusion-image-variation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lambdal/stable-diffusion-image-variation:7c399ba0e1b33ed8ec39ed30eb6b0a2d9e054462543c428c251293034af82a8e",
input={
"input_image": "https://replicate.delivery/pbxt/Hx7Lz9S1R56PHHotowtxAqDL8QYcB3pcb9qLUxM2zjA59J8d/ghibli.jpg",
"num_outputs": 1,
"guidance_scale": 5,
"num_inference_steps": 25
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lambdal/stable-diffusion-image-variation 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": "7c399ba0e1b33ed8ec39ed30eb6b0a2d9e054462543c428c251293034af82a8e",
"input": {
"input_image": "https://replicate.delivery/pbxt/Hx7Lz9S1R56PHHotowtxAqDL8QYcB3pcb9qLUxM2zjA59J8d/ghibli.jpg",
"num_outputs": 1,
"guidance_scale": 5,
"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.
Pull and run lambdal/stable-diffusion-image-variation using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/lambdal/stable-diffusion-image-variation@sha256:7c399ba0e1b33ed8ec39ed30eb6b0a2d9e054462543c428c251293034af82a8e \
-i 'input_image="https://replicate.delivery/pbxt/Hx7Lz9S1R56PHHotowtxAqDL8QYcB3pcb9qLUxM2zjA59J8d/ghibli.jpg"' \
-i 'num_outputs=1' \
-i 'guidance_scale=5' \
-i 'num_inference_steps=25'
To learn more, take a look at the Cog documentation.
Pull and run lambdal/stable-diffusion-image-variation using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/lambdal/stable-diffusion-image-variation@sha256:7c399ba0e1b33ed8ec39ed30eb6b0a2d9e054462543c428c251293034af82a8e
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "input_image": "https://replicate.delivery/pbxt/Hx7Lz9S1R56PHHotowtxAqDL8QYcB3pcb9qLUxM2zjA59J8d/ghibli.jpg", "num_outputs": 1, "guidance_scale": 5, "num_inference_steps": 25 } }' \ http://localhost:5000/predictions
Add a payment method to run this model.
Each run costs approximately $0.00022. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-12-13T15:14:28.551533Z",
"created_at": "2022-12-13T15:14:21.499369Z",
"data_removed": false,
"error": null,
"id": "dtknak46pnawhjvt32equoumm4",
"input": {
"input_image": "https://replicate.delivery/pbxt/Hx7Lz9S1R56PHHotowtxAqDL8QYcB3pcb9qLUxM2zjA59J8d/ghibli.jpg",
"num_outputs": "1",
"guidance_scale": "5",
"num_inference_steps": "25"
},
"logs": "Using seed: 58195\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|▍ | 1/25 [00:00<00:13, 1.80it/s]\n 8%|▊ | 2/25 [00:00<00:08, 2.75it/s]\n 12%|█▏ | 3/25 [00:01<00:06, 3.30it/s]\n 16%|█▌ | 4/25 [00:01<00:05, 3.65it/s]\n 20%|██ | 5/25 [00:01<00:05, 3.87it/s]\n 24%|██▍ | 6/25 [00:01<00:04, 4.02it/s]\n 28%|██▊ | 7/25 [00:01<00:04, 4.12it/s]\n 32%|███▏ | 8/25 [00:02<00:04, 4.20it/s]\n 36%|███▌ | 9/25 [00:02<00:03, 4.23it/s]\n 40%|████ | 10/25 [00:02<00:03, 4.26it/s]\n 44%|████▍ | 11/25 [00:02<00:03, 4.27it/s]\n 48%|████▊ | 12/25 [00:03<00:03, 4.30it/s]\n 52%|█████▏ | 13/25 [00:03<00:02, 4.32it/s]\n 56%|█████▌ | 14/25 [00:03<00:02, 4.31it/s]\n 60%|██████ | 15/25 [00:03<00:02, 4.32it/s]\n 64%|██████▍ | 16/25 [00:04<00:02, 4.32it/s]\n 68%|██████▊ | 17/25 [00:04<00:01, 4.32it/s]\n 72%|███████▏ | 18/25 [00:04<00:01, 4.32it/s]\n 76%|███████▌ | 19/25 [00:04<00:01, 4.32it/s]\n 80%|████████ | 20/25 [00:04<00:01, 4.32it/s]\n 84%|████████▍ | 21/25 [00:05<00:00, 4.32it/s]\n 88%|████████▊ | 22/25 [00:05<00:00, 4.32it/s]\n 92%|█████████▏| 23/25 [00:05<00:00, 4.30it/s]\n 96%|█████████▌| 24/25 [00:05<00:00, 4.33it/s]\n100%|██████████| 25/25 [00:06<00:00, 4.34it/s]\n100%|██████████| 25/25 [00:06<00:00, 4.10it/s]",
"metrics": {
"predict_time": 7.010246,
"total_time": 7.052164
},
"output": [
"https://replicate.delivery/pbxt/NuOwoYY7FqpeP6IhoLff40iY7gisZV9GZyhyCAqu5SqpGJTgA/out-0.png"
],
"started_at": "2022-12-13T15:14:21.541287Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/dtknak46pnawhjvt32equoumm4",
"cancel": "https://api.replicate.com/v1/predictions/dtknak46pnawhjvt32equoumm4/cancel"
},
"version": "7c399ba0e1b33ed8ec39ed30eb6b0a2d9e054462543c428c251293034af82a8e"
}
Using seed: 58195
0%| | 0/25 [00:00<?, ?it/s]
4%|▍ | 1/25 [00:00<00:13, 1.80it/s]
8%|▊ | 2/25 [00:00<00:08, 2.75it/s]
12%|█▏ | 3/25 [00:01<00:06, 3.30it/s]
16%|█▌ | 4/25 [00:01<00:05, 3.65it/s]
20%|██ | 5/25 [00:01<00:05, 3.87it/s]
24%|██▍ | 6/25 [00:01<00:04, 4.02it/s]
28%|██▊ | 7/25 [00:01<00:04, 4.12it/s]
32%|███▏ | 8/25 [00:02<00:04, 4.20it/s]
36%|███▌ | 9/25 [00:02<00:03, 4.23it/s]
40%|████ | 10/25 [00:02<00:03, 4.26it/s]
44%|████▍ | 11/25 [00:02<00:03, 4.27it/s]
48%|████▊ | 12/25 [00:03<00:03, 4.30it/s]
52%|█████▏ | 13/25 [00:03<00:02, 4.32it/s]
56%|█████▌ | 14/25 [00:03<00:02, 4.31it/s]
60%|██████ | 15/25 [00:03<00:02, 4.32it/s]
64%|██████▍ | 16/25 [00:04<00:02, 4.32it/s]
68%|██████▊ | 17/25 [00:04<00:01, 4.32it/s]
72%|███████▏ | 18/25 [00:04<00:01, 4.32it/s]
76%|███████▌ | 19/25 [00:04<00:01, 4.32it/s]
80%|████████ | 20/25 [00:04<00:01, 4.32it/s]
84%|████████▍ | 21/25 [00:05<00:00, 4.32it/s]
88%|████████▊ | 22/25 [00:05<00:00, 4.32it/s]
92%|█████████▏| 23/25 [00:05<00:00, 4.30it/s]
96%|█████████▌| 24/25 [00:05<00:00, 4.33it/s]
100%|██████████| 25/25 [00:06<00:00, 4.34it/s]
100%|██████████| 25/25 [00:06<00:00, 4.10it/s]