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.
mcai /dreamshaper-v6-img2img:c7959eb3
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 mcai/dreamshaper-v6-img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mcai/dreamshaper-v6-img2img:c7959eb3a86c09b449dacc11ce8bba295fda466fc6935ab8709e35f4f48c980c",
{
input: {
image: "https://replicate.delivery/pbxt/IvpKFGkiQb4HPnAHzEFIgIvCgp0Kv0zp6YmzhJTxVfgkTJx0/1685721671_881.png",
prompt: "Photo of a lone astronaut standing on a barren planet, looking up at the stars, surrounded by remnants of a destroyed spaceship. Deep blue filter, harsh shadows, intense stare, gritty texture, captured by a Sony Alpha 7S III camera.",
upscale: 2,
strength: 0.5,
scheduler: "EulerAncestralDiscrete",
num_outputs: 1,
guidance_scale: 7.5,
negative_prompt: "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
num_inference_steps: 30
}
}
);
// 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 mcai/dreamshaper-v6-img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mcai/dreamshaper-v6-img2img:c7959eb3a86c09b449dacc11ce8bba295fda466fc6935ab8709e35f4f48c980c",
input={
"image": "https://replicate.delivery/pbxt/IvpKFGkiQb4HPnAHzEFIgIvCgp0Kv0zp6YmzhJTxVfgkTJx0/1685721671_881.png",
"prompt": "Photo of a lone astronaut standing on a barren planet, looking up at the stars, surrounded by remnants of a destroyed spaceship. Deep blue filter, harsh shadows, intense stare, gritty texture, captured by a Sony Alpha 7S III camera.",
"upscale": 2,
"strength": 0.5,
"scheduler": "EulerAncestralDiscrete",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
"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 mcai/dreamshaper-v6-img2img 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": "mcai/dreamshaper-v6-img2img:c7959eb3a86c09b449dacc11ce8bba295fda466fc6935ab8709e35f4f48c980c",
"input": {
"image": "https://replicate.delivery/pbxt/IvpKFGkiQb4HPnAHzEFIgIvCgp0Kv0zp6YmzhJTxVfgkTJx0/1685721671_881.png",
"prompt": "Photo of a lone astronaut standing on a barren planet, looking up at the stars, surrounded by remnants of a destroyed spaceship. Deep blue filter, harsh shadows, intense stare, gritty texture, captured by a Sony Alpha 7S III camera.",
"upscale": 2,
"strength": 0.5,
"scheduler": "EulerAncestralDiscrete",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
"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": "2023-06-02T16:01:56.370358Z",
"created_at": "2023-06-02T16:01:49.958409Z",
"data_removed": false,
"error": null,
"id": "uasulw6itrgu3iklr442itrh7m",
"input": {
"image": "https://replicate.delivery/pbxt/IvpKFGkiQb4HPnAHzEFIgIvCgp0Kv0zp6YmzhJTxVfgkTJx0/1685721671_881.png",
"prompt": "Photo of a lone astronaut standing on a barren planet, looking up at the stars, surrounded by remnants of a destroyed spaceship. Deep blue filter, harsh shadows, intense stare, gritty texture, captured by a Sony Alpha 7S III camera.",
"upscale": 2,
"strength": 0.5,
"scheduler": "EulerAncestralDiscrete",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
"num_inference_steps": 30
},
"logs": "Using seed: 12669\n 0%| | 0/15 [00:00<?, ?it/s]\n 7%|▋ | 1/15 [00:00<00:05, 2.43it/s]\n 13%|█▎ | 2/15 [00:00<00:03, 3.27it/s]\n 20%|██ | 3/15 [00:00<00:03, 3.69it/s]\n 27%|██▋ | 4/15 [00:01<00:02, 3.92it/s]\n 33%|███▎ | 5/15 [00:01<00:02, 4.06it/s]\n 40%|████ | 6/15 [00:01<00:02, 4.15it/s]\n 47%|████▋ | 7/15 [00:01<00:01, 4.21it/s]\n 53%|█████▎ | 8/15 [00:02<00:01, 4.25it/s]\n 60%|██████ | 9/15 [00:02<00:01, 4.28it/s]\n 67%|██████▋ | 10/15 [00:02<00:01, 4.29it/s]\n 73%|███████▎ | 11/15 [00:02<00:00, 4.31it/s]\n 80%|████████ | 12/15 [00:02<00:00, 4.32it/s]\n 87%|████████▋ | 13/15 [00:03<00:00, 4.33it/s]\n 93%|█████████▎| 14/15 [00:03<00:00, 4.33it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.33it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.12it/s]",
"metrics": {
"predict_time": 6.450156,
"total_time": 6.411949
},
"output": [
"https://replicate.delivery/pbxt/TOaGaIEk8HZmOlXZpf2k1bNcdiZ4gHx0xFlLa8uA9g95IeBRA/out-0.png"
],
"started_at": "2023-06-02T16:01:49.920202Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/uasulw6itrgu3iklr442itrh7m",
"cancel": "https://api.replicate.com/v1/predictions/uasulw6itrgu3iklr442itrh7m/cancel"
},
"version": "c7959eb3a86c09b449dacc11ce8bba295fda466fc6935ab8709e35f4f48c980c"
}
Using seed: 12669
0%| | 0/15 [00:00<?, ?it/s]
7%|▋ | 1/15 [00:00<00:05, 2.43it/s]
13%|█▎ | 2/15 [00:00<00:03, 3.27it/s]
20%|██ | 3/15 [00:00<00:03, 3.69it/s]
27%|██▋ | 4/15 [00:01<00:02, 3.92it/s]
33%|███▎ | 5/15 [00:01<00:02, 4.06it/s]
40%|████ | 6/15 [00:01<00:02, 4.15it/s]
47%|████▋ | 7/15 [00:01<00:01, 4.21it/s]
53%|█████▎ | 8/15 [00:02<00:01, 4.25it/s]
60%|██████ | 9/15 [00:02<00:01, 4.28it/s]
67%|██████▋ | 10/15 [00:02<00:01, 4.29it/s]
73%|███████▎ | 11/15 [00:02<00:00, 4.31it/s]
80%|████████ | 12/15 [00:02<00:00, 4.32it/s]
87%|████████▋ | 13/15 [00:03<00:00, 4.33it/s]
93%|█████████▎| 14/15 [00:03<00:00, 4.33it/s]
100%|██████████| 15/15 [00:03<00:00, 4.33it/s]
100%|██████████| 15/15 [00:03<00:00, 4.12it/s]