typefile
{
"image": "https://replicate.delivery/pbxt/JMFTBedUCq2YcIWXK95GvAP5suWNYAdHCmmXg45VwBrmrbgI/demo.png",
"mask": "https://replicate.delivery/pbxt/JMFTAoakV61DYtoXAZaouH6RJO665euZPEVtcs22GFdLBfWh/mask.png",
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"prompt": "a tabby cat, high resolution, sitting on a park bench",
"seed": 57709,
"steps": 20,
"strength": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_BZQ**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/realistic-vision-v5-inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/realistic-vision-v5-inpainting:c0f549d4b1a3bbc4642042558b1a6d888eca083c1e3fcd21151b1a37918b154a",
{
input: {
image: "https://replicate.delivery/pbxt/JMFTBedUCq2YcIWXK95GvAP5suWNYAdHCmmXg45VwBrmrbgI/demo.png",
mask: "https://replicate.delivery/pbxt/JMFTAoakV61DYtoXAZaouH6RJO665euZPEVtcs22GFdLBfWh/mask.png",
negative_prompt: "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
prompt: "a tabby cat, high resolution, sitting on a park bench",
seed: 57709,
steps: 20,
strength: 0.8
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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=r8_BZQ**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/realistic-vision-v5-inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/realistic-vision-v5-inpainting:c0f549d4b1a3bbc4642042558b1a6d888eca083c1e3fcd21151b1a37918b154a",
input={
"image": "https://replicate.delivery/pbxt/JMFTBedUCq2YcIWXK95GvAP5suWNYAdHCmmXg45VwBrmrbgI/demo.png",
"mask": "https://replicate.delivery/pbxt/JMFTAoakV61DYtoXAZaouH6RJO665euZPEVtcs22GFdLBfWh/mask.png",
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"prompt": "a tabby cat, high resolution, sitting on a park bench",
"seed": 57709,
"steps": 20,
"strength": 0.8
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_BZQ**********************************
This is your API token. Keep it to yourself.
Run lucataco/realistic-vision-v5-inpainting 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": "lucataco/realistic-vision-v5-inpainting:c0f549d4b1a3bbc4642042558b1a6d888eca083c1e3fcd21151b1a37918b154a",
"input": {
"image": "https://replicate.delivery/pbxt/JMFTBedUCq2YcIWXK95GvAP5suWNYAdHCmmXg45VwBrmrbgI/demo.png",
"mask": "https://replicate.delivery/pbxt/JMFTAoakV61DYtoXAZaouH6RJO665euZPEVtcs22GFdLBfWh/mask.png",
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"prompt": "a tabby cat, high resolution, sitting on a park bench",
"seed": 57709,
"steps": 20,
"strength": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "vse5amlbwesjjmg7iy2mtnazja",
"model": "lucataco/realistic-vision-v5-inpainting",
"version": "c0f549d4b1a3bbc4642042558b1a6d888eca083c1e3fcd21151b1a37918b154a",
"input": {
"image": "https://replicate.delivery/pbxt/JMFTBedUCq2YcIWXK95GvAP5suWNYAdHCmmXg45VwBrmrbgI/demo.png",
"mask": "https://replicate.delivery/pbxt/JMFTAoakV61DYtoXAZaouH6RJO665euZPEVtcs22GFdLBfWh/mask.png",
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"prompt": "a tabby cat, high resolution, sitting on a park bench",
"seed": 57709,
"steps": 20,
"strength": 0.8
},
"logs": "Using seed: 57709\n 0%| | 0/16 [00:00<?, ?it/s]\n 6%|▋ | 1/16 [00:01<00:17, 1.15s/it]\n 12%|█▎ | 2/16 [00:02<00:13, 1.01it/s]\n 19%|█▉ | 3/16 [00:02<00:12, 1.06it/s]\n 25%|██▌ | 4/16 [00:03<00:11, 1.09it/s]\n 31%|███▏ | 5/16 [00:04<00:09, 1.11it/s]\n 38%|███▊ | 6/16 [00:05<00:08, 1.12it/s]\n 44%|████▍ | 7/16 [00:06<00:08, 1.12it/s]\n 50%|█████ | 8/16 [00:07<00:07, 1.13it/s]\n 56%|█████▋ | 9/16 [00:08<00:06, 1.13it/s]\n 62%|██████▎ | 10/16 [00:09<00:05, 1.13it/s]\n 69%|██████▉ | 11/16 [00:09<00:04, 1.13it/s]\n 75%|███████▌ | 12/16 [00:10<00:03, 1.13it/s]\n 81%|████████▏ | 13/16 [00:11<00:02, 1.13it/s]\n 88%|████████▊ | 14/16 [00:12<00:01, 1.13it/s]\n 94%|█████████▍| 15/16 [00:13<00:00, 1.13it/s]\n100%|██████████| 16/16 [00:14<00:00, 1.14it/s]\n100%|██████████| 16/16 [00:14<00:00, 1.11it/s]",
"output": "https://replicate.delivery/pbxt/9Byn4I8GwIZ5L9LoAnEczGMCgqvz7hhdXVL0QadSt1fEOPtIA/output.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-16T02:30:14.14778Z",
"started_at": "2023-08-16T02:31:18.923692Z",
"completed_at": "2023-08-16T02:31:38.152841Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/vse5amlbwesjjmg7iy2mtnazja/cancel",
"get": "https://api.replicate.com/v1/predictions/vse5amlbwesjjmg7iy2mtnazja"
},
"metrics": {
"predict_time": 19.229149,
"total_time": 84.005061
}
}

