Readme
…
Model description
…
Intended use
…
Ethical considerations
…
Caveats and recommendations
…
Generate a new image from an input image with Deliberate v2
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/deliberate-v2-img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mcai/deliberate-v2-img2img:958e647546803bf59c43affefdcb1f3273e6eebd5d98e72dc35d91099937384f",
{
input: {
image: "https://replicate.delivery/pbxt/IqK12GYGsUykFdVxDjLBuZ3C8llIS5fzs94eE8QaEyBZ7klD/out-0%20%281%29.png",
prompt: "highres, highest quality, illustration, ultra detailed, (detailed face), (detailed eyes), cinematic lighting, best quality, hyper detailed, 1girl, solo, (brown hair:1.4, long hair, ponytail), yellow eyes, blazer, black office pants, tired, dirty, muddy, blood, luminous eyes, detailed eyes, medium breasts, (colorful:1.2), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, (holding fist:1.4), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, ((masterpiece:1.5, absurdres:1.5, ultra detailed:1.5, ultra quality:1.5)), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, (dutch angle:1.2), ultra detailed background, highest quality background, official art, pixiv, deviant art, (solo:1.5), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds",
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, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
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/deliberate-v2-img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mcai/deliberate-v2-img2img:958e647546803bf59c43affefdcb1f3273e6eebd5d98e72dc35d91099937384f",
input={
"image": "https://replicate.delivery/pbxt/IqK12GYGsUykFdVxDjLBuZ3C8llIS5fzs94eE8QaEyBZ7klD/out-0%20%281%29.png",
"prompt": "highres, highest quality, illustration, ultra detailed, (detailed face), (detailed eyes), cinematic lighting, best quality, hyper detailed, 1girl, solo, (brown hair:1.4, long hair, ponytail), yellow eyes, blazer, black office pants, tired, dirty, muddy, blood, luminous eyes, detailed eyes, medium breasts, (colorful:1.2), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, (holding fist:1.4), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, ((masterpiece:1.5, absurdres:1.5, ultra detailed:1.5, ultra quality:1.5)), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, (dutch angle:1.2), ultra detailed background, highest quality background, official art, pixiv, deviant art, (solo:1.5), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds",
"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, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"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/deliberate-v2-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": "958e647546803bf59c43affefdcb1f3273e6eebd5d98e72dc35d91099937384f",
"input": {
"image": "https://replicate.delivery/pbxt/IqK12GYGsUykFdVxDjLBuZ3C8llIS5fzs94eE8QaEyBZ7klD/out-0%20%281%29.png",
"prompt": "highres, highest quality, illustration, ultra detailed, (detailed face), (detailed eyes), cinematic lighting, best quality, hyper detailed, 1girl, solo, (brown hair:1.4, long hair, ponytail), yellow eyes, blazer, black office pants, tired, dirty, muddy, blood, luminous eyes, detailed eyes, medium breasts, (colorful:1.2), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, (holding fist:1.4), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, ((masterpiece:1.5, absurdres:1.5, ultra detailed:1.5, ultra quality:1.5)), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, (dutch angle:1.2), ultra detailed background, highest quality background, official art, pixiv, deviant art, (solo:1.5), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds",
"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, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"num_inference_steps": 30
}
}' \
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/mcai/deliberate-v2-img2img@sha256:958e647546803bf59c43affefdcb1f3273e6eebd5d98e72dc35d91099937384f \
-i 'image="https://replicate.delivery/pbxt/IqK12GYGsUykFdVxDjLBuZ3C8llIS5fzs94eE8QaEyBZ7klD/out-0%20%281%29.png"' \
-i 'prompt="highres, highest quality, illustration, ultra detailed, (detailed face), (detailed eyes), cinematic lighting, best quality, hyper detailed, 1girl, solo, (brown hair:1.4, long hair, ponytail), yellow eyes, blazer, black office pants, tired, dirty, muddy, blood, luminous eyes, detailed eyes, medium breasts, (colorful:1.2), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, (holding fist:1.4), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, ((masterpiece:1.5, absurdres:1.5, ultra detailed:1.5, ultra quality:1.5)), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, (dutch angle:1.2), ultra detailed background, highest quality background, official art, pixiv, deviant art, (solo:1.5), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds"' \
-i 'upscale=2' \
-i 'strength=0.5' \
-i 'scheduler="EulerAncestralDiscrete"' \
-i 'num_outputs=1' \
-i 'guidance_scale=7.5' \
-i 'negative_prompt="disfigured, kitsch, ugly, oversaturated, greain, low-res, Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy"' \
-i 'num_inference_steps=30'
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/mcai/deliberate-v2-img2img@sha256:958e647546803bf59c43affefdcb1f3273e6eebd5d98e72dc35d91099937384f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/IqK12GYGsUykFdVxDjLBuZ3C8llIS5fzs94eE8QaEyBZ7klD/out-0%20%281%29.png", "prompt": "highres, highest quality, illustration, ultra detailed, (detailed face), (detailed eyes), cinematic lighting, best quality, hyper detailed, 1girl, solo, (brown hair:1.4, long hair, ponytail), yellow eyes, blazer, black office pants, tired, dirty, muddy, blood, luminous eyes, detailed eyes, medium breasts, (colorful:1.2), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, (holding fist:1.4), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, ((masterpiece:1.5, absurdres:1.5, ultra detailed:1.5, ultra quality:1.5)), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, (dutch angle:1.2), ultra detailed background, highest quality background, official art, pixiv, deviant art, (solo:1.5), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds", "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, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy", "num_inference_steps": 30 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.0044. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
{
"completed_at": "2023-05-18T03:49:02.335911Z",
"created_at": "2023-05-18T03:48:55.751063Z",
"data_removed": false,
"error": null,
"id": "wk6tbzawdnhj5gwgulkgokgrgq",
"input": {
"image": "https://replicate.delivery/pbxt/IqK12GYGsUykFdVxDjLBuZ3C8llIS5fzs94eE8QaEyBZ7klD/out-0%20%281%29.png",
"prompt": "highres, highest quality, illustration, ultra detailed, (detailed face), (detailed eyes), cinematic lighting, best quality, hyper detailed, 1girl, solo, (brown hair:1.4, long hair, ponytail), yellow eyes, blazer, black office pants, tired, dirty, muddy, blood, luminous eyes, detailed eyes, medium breasts, (colorful:1.2), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, (holding fist:1.4), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, ((masterpiece:1.5, absurdres:1.5, ultra detailed:1.5, ultra quality:1.5)), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, (dutch angle:1.2), ultra detailed background, highest quality background, official art, pixiv, deviant art, (solo:1.5), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds",
"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, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"num_inference_steps": 30
},
"logs": "Using seed: 55683\nToken indices sequence length is longer than the specified maximum sequence length for this model (266 > 77). Running this sequence through the model will result in indexing errors\nThe following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['1. 2 ), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, ( holding fist : 1. 4 ), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, (( masterpiece : 1. 5, absurdres : 1. 5, ultra detailed : 1. 5, ultra quality : 1. 5 )), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, ( dutch angle : 1. 2 ), ultra detailed background, highest quality background, official art, pixiv, deviant art, ( solo : 1. 5 ), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds']\n 0%| | 0/15 [00:00<?, ?it/s]\n 7%|▋ | 1/15 [00:00<00:03, 4.35it/s]\n 13%|█▎ | 2/15 [00:00<00:02, 4.34it/s]\n 20%|██ | 3/15 [00:00<00:02, 4.34it/s]\n 27%|██▋ | 4/15 [00:00<00:02, 4.34it/s]\n 33%|███▎ | 5/15 [00:01<00:02, 4.35it/s]\n 40%|████ | 6/15 [00:01<00:02, 4.35it/s]\n 47%|████▋ | 7/15 [00:01<00:01, 4.35it/s]\n 53%|█████▎ | 8/15 [00:01<00:01, 4.35it/s]\n 60%|██████ | 9/15 [00:02<00:01, 4.35it/s]\n 67%|██████▋ | 10/15 [00:02<00:01, 4.35it/s]\n 73%|███████▎ | 11/15 [00:02<00:00, 4.35it/s]\n 80%|████████ | 12/15 [00:02<00:00, 4.35it/s]\n 87%|████████▋ | 13/15 [00:02<00:00, 4.35it/s]\n 93%|█████████▎| 14/15 [00:03<00:00, 4.35it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.35it/s]\n100%|██████████| 15/15 [00:03<00:00, 4.35it/s]",
"metrics": {
"predict_time": 6.618531,
"total_time": 6.584848
},
"output": [
"https://replicate.delivery/pbxt/e0r8QzT2M01KXSy5HXeq065bMDlwEfVKMp51ibaUM06bRq5hA/out-0.png"
],
"started_at": "2023-05-18T03:48:55.717380Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/wk6tbzawdnhj5gwgulkgokgrgq",
"cancel": "https://api.replicate.com/v1/predictions/wk6tbzawdnhj5gwgulkgokgrgq/cancel"
},
"version": "c4205561f2a62095ae86c2fb9fd23115a4d5f1b7018a3ff8fb064058c02fb043"
}
Using seed: 55683
Token indices sequence length is longer than the specified maximum sequence length for this model (266 > 77). Running this sequence through the model will result in indexing errors
The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['1. 2 ), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, ( holding fist : 1. 4 ), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, (( masterpiece : 1. 5, absurdres : 1. 5, ultra detailed : 1. 5, ultra quality : 1. 5 )), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, ( dutch angle : 1. 2 ), ultra detailed background, highest quality background, official art, pixiv, deviant art, ( solo : 1. 5 ), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds']
0%| | 0/15 [00:00<?, ?it/s]
7%|▋ | 1/15 [00:00<00:03, 4.35it/s]
13%|█▎ | 2/15 [00:00<00:02, 4.34it/s]
20%|██ | 3/15 [00:00<00:02, 4.34it/s]
27%|██▋ | 4/15 [00:00<00:02, 4.34it/s]
33%|███▎ | 5/15 [00:01<00:02, 4.35it/s]
40%|████ | 6/15 [00:01<00:02, 4.35it/s]
47%|████▋ | 7/15 [00:01<00:01, 4.35it/s]
53%|█████▎ | 8/15 [00:01<00:01, 4.35it/s]
60%|██████ | 9/15 [00:02<00:01, 4.35it/s]
67%|██████▋ | 10/15 [00:02<00:01, 4.35it/s]
73%|███████▎ | 11/15 [00:02<00:00, 4.35it/s]
80%|████████ | 12/15 [00:02<00:00, 4.35it/s]
87%|████████▋ | 13/15 [00:02<00:00, 4.35it/s]
93%|█████████▎| 14/15 [00:03<00:00, 4.35it/s]
100%|██████████| 15/15 [00:03<00:00, 4.35it/s]
100%|██████████| 15/15 [00:03<00:00, 4.35it/s]
This output was created using a different version of the model, mcai/deliberate-v2-img2img:c4205561.
This model costs approximately $0.0044 to run on Replicate, or 227 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.
This model runs on Nvidia A100 (80GB) GPU hardware. Predictions typically complete within 4 seconds. The predict time for this model varies significantly based on the inputs.
…
…
…
…
…
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input
Using seed: 55683
Token indices sequence length is longer than the specified maximum sequence length for this model (266 > 77). Running this sequence through the model will result in indexing errors
The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['1. 2 ), looking at viewer, looking serious, alleyway, grey sky, rainy, bent, fighting stance, hands forward, ( holding fist : 1. 4 ), ready to fight, award winning, path tracing shadows, path tracing global illumination, path tracing ambient occlusion, ray tracing lights, best quality, (( masterpiece : 1. 5, absurdres : 1. 5, ultra detailed : 1. 5, ultra quality : 1. 5 )), best performance, confindent, best anatomy, perfect proportion, perfect hands, rich colors, professional color corection, rich colors, far out, from below, ( dutch angle : 1. 2 ), ultra detailed background, highest quality background, official art, pixiv, deviant art, ( solo : 1. 5 ), cinematic movie scenery, character focus, birmingham, birmingham streets, british, peaky blinders inspired, gangsta, crowded streets, bustling workers crowds']
0%| | 0/15 [00:00<?, ?it/s]
7%|▋ | 1/15 [00:00<00:03, 4.35it/s]
13%|█▎ | 2/15 [00:00<00:02, 4.34it/s]
20%|██ | 3/15 [00:00<00:02, 4.34it/s]
27%|██▋ | 4/15 [00:00<00:02, 4.34it/s]
33%|███▎ | 5/15 [00:01<00:02, 4.35it/s]
40%|████ | 6/15 [00:01<00:02, 4.35it/s]
47%|████▋ | 7/15 [00:01<00:01, 4.35it/s]
53%|█████▎ | 8/15 [00:01<00:01, 4.35it/s]
60%|██████ | 9/15 [00:02<00:01, 4.35it/s]
67%|██████▋ | 10/15 [00:02<00:01, 4.35it/s]
73%|███████▎ | 11/15 [00:02<00:00, 4.35it/s]
80%|████████ | 12/15 [00:02<00:00, 4.35it/s]
87%|████████▋ | 13/15 [00:02<00:00, 4.35it/s]
93%|█████████▎| 14/15 [00:03<00:00, 4.35it/s]
100%|██████████| 15/15 [00:03<00:00, 4.35it/s]
100%|██████████| 15/15 [00:03<00:00, 4.35it/s]