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.
zsxkib /flux-dev-inpainting:11cca327
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zsxkib/flux-dev-inpainting using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsxkib/flux-dev-inpainting:11cca3274341de7aef06f04e4dab3d651ea8ac04eff003f23603d4fdf5b56ff0",
{
input: {
mask: "https://replicate.delivery/pbxt/HtGQBqO9MtVbPm0G0K43nsvvjBB0E0PaWOhuNRrRBBT4ttbf/mask.png",
image: "https://replicate.delivery/pbxt/HtGQBfA5TrqFYZBf0UL18NTqHrzt8UiSIsAkUuMHtjvFDO6p/overture-creations-5sI6fQgYIuo.png",
prompt: "small cute cat sat on a park bench",
strength: 0.85,
output_format: "webp",
output_quality: 90,
num_inference_steps: 30
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run zsxkib/flux-dev-inpainting using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/flux-dev-inpainting:11cca3274341de7aef06f04e4dab3d651ea8ac04eff003f23603d4fdf5b56ff0",
input={
"mask": "https://replicate.delivery/pbxt/HtGQBqO9MtVbPm0G0K43nsvvjBB0E0PaWOhuNRrRBBT4ttbf/mask.png",
"image": "https://replicate.delivery/pbxt/HtGQBfA5TrqFYZBf0UL18NTqHrzt8UiSIsAkUuMHtjvFDO6p/overture-creations-5sI6fQgYIuo.png",
"prompt": "small cute cat sat on a park bench",
"strength": 0.85,
"output_format": "webp",
"output_quality": 90,
"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 zsxkib/flux-dev-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": "zsxkib/flux-dev-inpainting:11cca3274341de7aef06f04e4dab3d651ea8ac04eff003f23603d4fdf5b56ff0",
"input": {
"mask": "https://replicate.delivery/pbxt/HtGQBqO9MtVbPm0G0K43nsvvjBB0E0PaWOhuNRrRBBT4ttbf/mask.png",
"image": "https://replicate.delivery/pbxt/HtGQBfA5TrqFYZBf0UL18NTqHrzt8UiSIsAkUuMHtjvFDO6p/overture-creations-5sI6fQgYIuo.png",
"prompt": "small cute cat sat on a park bench",
"strength": 0.85,
"output_format": "webp",
"output_quality": 90,
"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": "2024-08-16T13:14:26.767358Z",
"created_at": "2024-08-16T13:14:12.290000Z",
"data_removed": false,
"error": null,
"id": "yy76h201r9rj20chbd9rqa4x2m",
"input": {
"mask": "https://replicate.delivery/pbxt/HtGQBqO9MtVbPm0G0K43nsvvjBB0E0PaWOhuNRrRBBT4ttbf/mask.png",
"image": "https://replicate.delivery/pbxt/HtGQBfA5TrqFYZBf0UL18NTqHrzt8UiSIsAkUuMHtjvFDO6p/overture-creations-5sI6fQgYIuo.png",
"prompt": "small cute cat sat on a park bench",
"strength": 0.85,
"output_format": "webp",
"output_quality": 90,
"num_inference_steps": 30
},
"logs": "Using seed: 235060614\n 0%| | 0/29 [00:00<?, ?it/s]\n 3%|β | 1/29 [00:00<00:15, 1.79it/s]\n 7%|β | 2/29 [00:01<00:13, 1.99it/s]\n 10%|β | 3/29 [00:01<00:12, 2.06it/s]\n 14%|ββ | 4/29 [00:01<00:11, 2.11it/s]\n 17%|ββ | 5/29 [00:02<00:11, 2.12it/s]\n 21%|ββ | 6/29 [00:02<00:10, 2.14it/s]\n 24%|βββ | 7/29 [00:03<00:10, 2.15it/s]\n 28%|βββ | 8/29 [00:03<00:09, 2.15it/s]\n 31%|βββ | 9/29 [00:04<00:09, 2.15it/s]\n 34%|ββββ | 10/29 [00:04<00:08, 2.16it/s]\n 38%|ββββ | 11/29 [00:05<00:08, 2.16it/s]\n 41%|βββββ | 12/29 [00:05<00:07, 2.16it/s]\n 45%|βββββ | 13/29 [00:06<00:07, 2.16it/s]\n 48%|βββββ | 14/29 [00:06<00:06, 2.16it/s]\n 52%|ββββββ | 15/29 [00:07<00:06, 2.16it/s]\n 55%|ββββββ | 16/29 [00:07<00:06, 2.16it/s]\n 59%|ββββββ | 17/29 [00:07<00:05, 2.16it/s]\n 62%|βββββββ | 18/29 [00:08<00:05, 2.16it/s]\n 66%|βββββββ | 19/29 [00:08<00:04, 2.16it/s]\n 69%|βββββββ | 20/29 [00:09<00:04, 2.16it/s]\n 72%|ββββββββ | 21/29 [00:09<00:03, 2.16it/s]\n 76%|ββββββββ | 22/29 [00:10<00:03, 2.16it/s]\n 79%|ββββββββ | 23/29 [00:10<00:02, 2.16it/s]\n 83%|βββββββββ | 24/29 [00:11<00:02, 2.16it/s]\n 86%|βββββββββ | 25/29 [00:11<00:01, 2.16it/s]\n 90%|βββββββββ | 26/29 [00:12<00:01, 2.16it/s]\n 93%|ββββββββββ| 27/29 [00:12<00:00, 2.16it/s]\n 97%|ββββββββββ| 28/29 [00:13<00:00, 2.16it/s]\n100%|ββββββββββ| 29/29 [00:13<00:00, 2.46it/s]\n100%|ββββββββββ| 29/29 [00:13<00:00, 2.17it/s]\nINFERENCE DONE\n[~] Saving to /tmp/output.webp...\n[~] Output format: WEBP\n[~] Output quality: 90",
"metrics": {
"predict_time": 14.467368014,
"total_time": 14.477358
},
"output": "https://replicate.delivery/yhqm/XgiTCp4dlDa1MpMXCmiemWdFzCrfqz5MUWKL9BnWf1eKrANNB/output.webp",
"started_at": "2024-08-16T13:14:12.299990Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/yy76h201r9rj20chbd9rqa4x2m",
"cancel": "https://api.replicate.com/v1/predictions/yy76h201r9rj20chbd9rqa4x2m/cancel"
},
"version": "11cca3274341de7aef06f04e4dab3d651ea8ac04eff003f23603d4fdf5b56ff0"
}
Using seed: 235060614
0%| | 0/29 [00:00<?, ?it/s]
3%|β | 1/29 [00:00<00:15, 1.79it/s]
7%|β | 2/29 [00:01<00:13, 1.99it/s]
10%|β | 3/29 [00:01<00:12, 2.06it/s]
14%|ββ | 4/29 [00:01<00:11, 2.11it/s]
17%|ββ | 5/29 [00:02<00:11, 2.12it/s]
21%|ββ | 6/29 [00:02<00:10, 2.14it/s]
24%|βββ | 7/29 [00:03<00:10, 2.15it/s]
28%|βββ | 8/29 [00:03<00:09, 2.15it/s]
31%|βββ | 9/29 [00:04<00:09, 2.15it/s]
34%|ββββ | 10/29 [00:04<00:08, 2.16it/s]
38%|ββββ | 11/29 [00:05<00:08, 2.16it/s]
41%|βββββ | 12/29 [00:05<00:07, 2.16it/s]
45%|βββββ | 13/29 [00:06<00:07, 2.16it/s]
48%|βββββ | 14/29 [00:06<00:06, 2.16it/s]
52%|ββββββ | 15/29 [00:07<00:06, 2.16it/s]
55%|ββββββ | 16/29 [00:07<00:06, 2.16it/s]
59%|ββββββ | 17/29 [00:07<00:05, 2.16it/s]
62%|βββββββ | 18/29 [00:08<00:05, 2.16it/s]
66%|βββββββ | 19/29 [00:08<00:04, 2.16it/s]
69%|βββββββ | 20/29 [00:09<00:04, 2.16it/s]
72%|ββββββββ | 21/29 [00:09<00:03, 2.16it/s]
76%|ββββββββ | 22/29 [00:10<00:03, 2.16it/s]
79%|ββββββββ | 23/29 [00:10<00:02, 2.16it/s]
83%|βββββββββ | 24/29 [00:11<00:02, 2.16it/s]
86%|βββββββββ | 25/29 [00:11<00:01, 2.16it/s]
90%|βββββββββ | 26/29 [00:12<00:01, 2.16it/s]
93%|ββββββββββ| 27/29 [00:12<00:00, 2.16it/s]
97%|ββββββββββ| 28/29 [00:13<00:00, 2.16it/s]
100%|ββββββββββ| 29/29 [00:13<00:00, 2.46it/s]
100%|ββββββββββ| 29/29 [00:13<00:00, 2.17it/s]
INFERENCE DONE
[~] Saving to /tmp/output.webp...
[~] Output format: WEBP
[~] Output quality: 90