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.
lucataco /ip_adapter-face-inpaint:b199f118
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 lucataco/ip_adapter-face-inpaint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890",
{
input: {
prompt: "",
strength: 0.2,
face_image: "https://replicate.delivery/pbxt/JsWfFSjR5CFpILAmfD8SEVtMmExvDrPPmOlpHuaBt1SxpSFK/girl.png",
blur_amount: 0,
num_outputs: 1,
source_image: "https://replicate.delivery/pbxt/JsWfFmQjpmhIiGXnzMPrn3bWvL9POXMbCbcppUCj6K1ckpJN/a.png"
}
}
);
// 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 lucataco/ip_adapter-face-inpaint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890",
input={
"prompt": "",
"strength": 0.2,
"face_image": "https://replicate.delivery/pbxt/JsWfFSjR5CFpILAmfD8SEVtMmExvDrPPmOlpHuaBt1SxpSFK/girl.png",
"blur_amount": 0,
"num_outputs": 1,
"source_image": "https://replicate.delivery/pbxt/JsWfFmQjpmhIiGXnzMPrn3bWvL9POXMbCbcppUCj6K1ckpJN/a.png"
}
)
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 lucataco/ip_adapter-face-inpaint 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/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890",
"input": {
"prompt": "",
"strength": 0.2,
"face_image": "https://replicate.delivery/pbxt/JsWfFSjR5CFpILAmfD8SEVtMmExvDrPPmOlpHuaBt1SxpSFK/girl.png",
"blur_amount": 0,
"num_outputs": 1,
"source_image": "https://replicate.delivery/pbxt/JsWfFmQjpmhIiGXnzMPrn3bWvL9POXMbCbcppUCj6K1ckpJN/a.png"
}
}' \
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-11-15T00:54:13.606075Z",
"created_at": "2023-11-15T00:54:06.775789Z",
"data_removed": false,
"error": null,
"id": "o2fcizdbvlav7fwunf5usfzjfy",
"input": {
"prompt": "",
"strength": 0.2,
"face_image": "https://replicate.delivery/pbxt/JsWfFSjR5CFpILAmfD8SEVtMmExvDrPPmOlpHuaBt1SxpSFK/girl.png",
"blur_amount": 0,
"num_outputs": 1,
"source_image": "https://replicate.delivery/pbxt/JsWfFmQjpmhIiGXnzMPrn3bWvL9POXMbCbcppUCj6K1ckpJN/a.png"
},
"logs": "Using seed: 24260\n(305, 142, 157, 157)\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:00, 9.61it/s]\n 20%|██ | 2/10 [00:00<00:00, 9.53it/s]\n 30%|███ | 3/10 [00:00<00:00, 9.47it/s]\n 40%|████ | 4/10 [00:00<00:00, 9.45it/s]\n 50%|█████ | 5/10 [00:00<00:00, 9.44it/s]\n 60%|██████ | 6/10 [00:00<00:00, 9.45it/s]\n 70%|███████ | 7/10 [00:00<00:00, 9.43it/s]\n 80%|████████ | 8/10 [00:00<00:00, 9.42it/s]\n 90%|█████████ | 9/10 [00:00<00:00, 9.37it/s]\n100%|██████████| 10/10 [00:01<00:00, 9.37it/s]\n100%|██████████| 10/10 [00:01<00:00, 9.42it/s]",
"metrics": {
"predict_time": 6.796903,
"total_time": 6.830286
},
"output": [
"https://replicate.delivery/pbxt/Ps5fOrjIYjzWFChjJRIdTOA5Wn7JSNu2qd43bcfEmld0ic4RA/out-0.png"
],
"started_at": "2023-11-15T00:54:06.809172Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/o2fcizdbvlav7fwunf5usfzjfy",
"cancel": "https://api.replicate.com/v1/predictions/o2fcizdbvlav7fwunf5usfzjfy/cancel"
},
"version": "b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890"
}
Using seed: 24260
(305, 142, 157, 157)
0%| | 0/10 [00:00<?, ?it/s]
10%|█ | 1/10 [00:00<00:00, 9.61it/s]
20%|██ | 2/10 [00:00<00:00, 9.53it/s]
30%|███ | 3/10 [00:00<00:00, 9.47it/s]
40%|████ | 4/10 [00:00<00:00, 9.45it/s]
50%|█████ | 5/10 [00:00<00:00, 9.44it/s]
60%|██████ | 6/10 [00:00<00:00, 9.45it/s]
70%|███████ | 7/10 [00:00<00:00, 9.43it/s]
80%|████████ | 8/10 [00:00<00:00, 9.42it/s]
90%|█████████ | 9/10 [00:00<00:00, 9.37it/s]
100%|██████████| 10/10 [00:01<00:00, 9.37it/s]
100%|██████████| 10/10 [00:01<00:00, 9.42it/s]