lucataco / ip_adapter-face-inpaint
A combination of ip_adapter SDv1.5 and mediapipe-face to inpaint a face
Prediction
lucataco/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890ID4olm5h3bk6mnf7gimcd7uju5lqStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
{ "prompt": "", "strength": 0.7, "face_image": "https://replicate.delivery/pbxt/JsWcNDv5Lp8NeokDpKZUYxdKLCRKzjr0c1hPuDfotlr4zLky/girl.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWcMzZ0IfxfBPZBtgqtdTNsCYDFMeGxjy0kQld7cgZkuhvG/geisha.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; 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.7, face_image: "https://replicate.delivery/pbxt/JsWcNDv5Lp8NeokDpKZUYxdKLCRKzjr0c1hPuDfotlr4zLky/girl.png", blur_amount: 0, num_outputs: 1, source_image: "https://replicate.delivery/pbxt/JsWcMzZ0IfxfBPZBtgqtdTNsCYDFMeGxjy0kQld7cgZkuhvG/geisha.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.
Install Replicate’s Python client library:pip install replicate
Import the client: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.7, "face_image": "https://replicate.delivery/pbxt/JsWcNDv5Lp8NeokDpKZUYxdKLCRKzjr0c1hPuDfotlr4zLky/girl.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWcMzZ0IfxfBPZBtgqtdTNsCYDFMeGxjy0kQld7cgZkuhvG/geisha.png" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
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.7, "face_image": "https://replicate.delivery/pbxt/JsWcNDv5Lp8NeokDpKZUYxdKLCRKzjr0c1hPuDfotlr4zLky/girl.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWcMzZ0IfxfBPZBtgqtdTNsCYDFMeGxjy0kQld7cgZkuhvG/geisha.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-11-15T00:51:17.675723Z", "created_at": "2023-11-15T00:51:04.601746Z", "data_removed": false, "error": null, "id": "4olm5h3bk6mnf7gimcd7uju5lq", "input": { "prompt": "", "strength": 0.7, "face_image": "https://replicate.delivery/pbxt/JsWcNDv5Lp8NeokDpKZUYxdKLCRKzjr0c1hPuDfotlr4zLky/girl.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWcMzZ0IfxfBPZBtgqtdTNsCYDFMeGxjy0kQld7cgZkuhvG/geisha.png" }, "logs": "Using seed: 12755\n(122, 322, 382, 382)\n 0%| | 0/35 [00:00<?, ?it/s]\n 3%|▎ | 1/35 [00:00<00:06, 5.42it/s]\n 6%|▌ | 2/35 [00:00<00:06, 5.39it/s]\n 9%|▊ | 3/35 [00:00<00:05, 5.37it/s]\n 11%|█▏ | 4/35 [00:00<00:05, 5.37it/s]\n 14%|█▍ | 5/35 [00:00<00:05, 5.35it/s]\n 17%|█▋ | 6/35 [00:01<00:05, 5.35it/s]\n 20%|██ | 7/35 [00:01<00:05, 5.36it/s]\n 23%|██▎ | 8/35 [00:01<00:05, 5.35it/s]\n 26%|██▌ | 9/35 [00:01<00:04, 5.35it/s]\n 29%|██▊ | 10/35 [00:01<00:04, 5.34it/s]\n 31%|███▏ | 11/35 [00:02<00:04, 5.33it/s]\n 34%|███▍ | 12/35 [00:02<00:04, 5.33it/s]\n 37%|███▋ | 13/35 [00:02<00:04, 5.34it/s]\n 40%|████ | 14/35 [00:02<00:03, 5.33it/s]\n 43%|████▎ | 15/35 [00:02<00:03, 5.34it/s]\n 46%|████▌ | 16/35 [00:02<00:03, 5.32it/s]\n 49%|████▊ | 17/35 [00:03<00:03, 5.32it/s]\n 51%|█████▏ | 18/35 [00:03<00:03, 5.32it/s]\n 54%|█████▍ | 19/35 [00:03<00:03, 5.32it/s]\n 57%|█████▋ | 20/35 [00:03<00:02, 5.33it/s]\n 60%|██████ | 21/35 [00:03<00:02, 5.32it/s]\n 63%|██████▎ | 22/35 [00:04<00:02, 5.32it/s]\n 66%|██████▌ | 23/35 [00:04<00:02, 5.32it/s]\n 69%|██████▊ | 24/35 [00:04<00:02, 5.32it/s]\n 71%|███████▏ | 25/35 [00:04<00:01, 5.33it/s]\n 74%|███████▍ | 26/35 [00:04<00:01, 5.32it/s]\n 77%|███████▋ | 27/35 [00:05<00:01, 5.31it/s]\n 80%|████████ | 28/35 [00:05<00:01, 5.32it/s]\n 83%|████████▎ | 29/35 [00:05<00:01, 5.31it/s]\n 86%|████████▌ | 30/35 [00:05<00:00, 5.32it/s]\n 89%|████████▊ | 31/35 [00:05<00:00, 5.31it/s]\n 91%|█████████▏| 32/35 [00:06<00:00, 5.31it/s]\n 94%|█████████▍| 33/35 [00:06<00:00, 5.31it/s]\n 97%|█████████▋| 34/35 [00:06<00:00, 5.31it/s]\n100%|██████████| 35/35 [00:06<00:00, 5.32it/s]\n100%|██████████| 35/35 [00:06<00:00, 5.33it/s]", "metrics": { "predict_time": 13.040806, "total_time": 13.073977 }, "output": [ "https://replicate.delivery/pbxt/xEdYleGC352GAyx1ovitmxqg1Bh36JDESvKl3MkWgUFCQO8IA/out-0.png" ], "started_at": "2023-11-15T00:51:04.634917Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/4olm5h3bk6mnf7gimcd7uju5lq", "cancel": "https://api.replicate.com/v1/predictions/4olm5h3bk6mnf7gimcd7uju5lq/cancel" }, "version": "b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890" }
Generated inUsing seed: 12755 (122, 322, 382, 382) 0%| | 0/35 [00:00<?, ?it/s] 3%|▎ | 1/35 [00:00<00:06, 5.42it/s] 6%|▌ | 2/35 [00:00<00:06, 5.39it/s] 9%|▊ | 3/35 [00:00<00:05, 5.37it/s] 11%|█▏ | 4/35 [00:00<00:05, 5.37it/s] 14%|█▍ | 5/35 [00:00<00:05, 5.35it/s] 17%|█▋ | 6/35 [00:01<00:05, 5.35it/s] 20%|██ | 7/35 [00:01<00:05, 5.36it/s] 23%|██▎ | 8/35 [00:01<00:05, 5.35it/s] 26%|██▌ | 9/35 [00:01<00:04, 5.35it/s] 29%|██▊ | 10/35 [00:01<00:04, 5.34it/s] 31%|███▏ | 11/35 [00:02<00:04, 5.33it/s] 34%|███▍ | 12/35 [00:02<00:04, 5.33it/s] 37%|███▋ | 13/35 [00:02<00:04, 5.34it/s] 40%|████ | 14/35 [00:02<00:03, 5.33it/s] 43%|████▎ | 15/35 [00:02<00:03, 5.34it/s] 46%|████▌ | 16/35 [00:02<00:03, 5.32it/s] 49%|████▊ | 17/35 [00:03<00:03, 5.32it/s] 51%|█████▏ | 18/35 [00:03<00:03, 5.32it/s] 54%|█████▍ | 19/35 [00:03<00:03, 5.32it/s] 57%|█████▋ | 20/35 [00:03<00:02, 5.33it/s] 60%|██████ | 21/35 [00:03<00:02, 5.32it/s] 63%|██████▎ | 22/35 [00:04<00:02, 5.32it/s] 66%|██████▌ | 23/35 [00:04<00:02, 5.32it/s] 69%|██████▊ | 24/35 [00:04<00:02, 5.32it/s] 71%|███████▏ | 25/35 [00:04<00:01, 5.33it/s] 74%|███████▍ | 26/35 [00:04<00:01, 5.32it/s] 77%|███████▋ | 27/35 [00:05<00:01, 5.31it/s] 80%|████████ | 28/35 [00:05<00:01, 5.32it/s] 83%|████████▎ | 29/35 [00:05<00:01, 5.31it/s] 86%|████████▌ | 30/35 [00:05<00:00, 5.32it/s] 89%|████████▊ | 31/35 [00:05<00:00, 5.31it/s] 91%|█████████▏| 32/35 [00:06<00:00, 5.31it/s] 94%|█████████▍| 33/35 [00:06<00:00, 5.31it/s] 97%|█████████▋| 34/35 [00:06<00:00, 5.31it/s] 100%|██████████| 35/35 [00:06<00:00, 5.32it/s] 100%|██████████| 35/35 [00:06<00:00, 5.33it/s]
Prediction
lucataco/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890IDmbkwjrlba4uu3d44j6ys3lt5ueStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
{ "prompt": "", "strength": 0.7, "face_image": "https://replicate.delivery/pbxt/JsWdhaBZwGrBSo5kvcro109phpRpwjILrpAtpb5EuAhehbEu/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWdh5gFdnqfjm2pvwJUm1jINc5cE1xsBOcSBumwpNg5VYlC/geisha.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; 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.7, face_image: "https://replicate.delivery/pbxt/JsWdhaBZwGrBSo5kvcro109phpRpwjILrpAtpb5EuAhehbEu/ai_face2.png", blur_amount: 0, num_outputs: 1, source_image: "https://replicate.delivery/pbxt/JsWdh5gFdnqfjm2pvwJUm1jINc5cE1xsBOcSBumwpNg5VYlC/geisha.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.
Install Replicate’s Python client library:pip install replicate
Import the client: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.7, "face_image": "https://replicate.delivery/pbxt/JsWdhaBZwGrBSo5kvcro109phpRpwjILrpAtpb5EuAhehbEu/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWdh5gFdnqfjm2pvwJUm1jINc5cE1xsBOcSBumwpNg5VYlC/geisha.png" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
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.7, "face_image": "https://replicate.delivery/pbxt/JsWdhaBZwGrBSo5kvcro109phpRpwjILrpAtpb5EuAhehbEu/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWdh5gFdnqfjm2pvwJUm1jINc5cE1xsBOcSBumwpNg5VYlC/geisha.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-11-15T00:52:42.575440Z", "created_at": "2023-11-15T00:52:29.223716Z", "data_removed": false, "error": null, "id": "mbkwjrlba4uu3d44j6ys3lt5ue", "input": { "prompt": "", "strength": 0.7, "face_image": "https://replicate.delivery/pbxt/JsWdhaBZwGrBSo5kvcro109phpRpwjILrpAtpb5EuAhehbEu/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWdh5gFdnqfjm2pvwJUm1jINc5cE1xsBOcSBumwpNg5VYlC/geisha.png" }, "logs": "Using seed: 50424\n(122, 322, 382, 382)\n 0%| | 0/35 [00:00<?, ?it/s]\n 3%|▎ | 1/35 [00:00<00:06, 5.39it/s]\n 6%|▌ | 2/35 [00:00<00:06, 5.36it/s]\n 9%|▊ | 3/35 [00:00<00:05, 5.35it/s]\n 11%|█▏ | 4/35 [00:00<00:05, 5.34it/s]\n 14%|█▍ | 5/35 [00:00<00:05, 5.32it/s]\n 17%|█▋ | 6/35 [00:01<00:05, 5.33it/s]\n 20%|██ | 7/35 [00:01<00:05, 5.33it/s]\n 23%|██▎ | 8/35 [00:01<00:05, 5.33it/s]\n 26%|██▌ | 9/35 [00:01<00:04, 5.33it/s]\n 29%|██▊ | 10/35 [00:01<00:04, 5.31it/s]\n 31%|███▏ | 11/35 [00:02<00:04, 5.32it/s]\n 34%|███▍ | 12/35 [00:02<00:04, 5.31it/s]\n 37%|███▋ | 13/35 [00:02<00:04, 5.32it/s]\n 40%|████ | 14/35 [00:02<00:03, 5.31it/s]\n 43%|████▎ | 15/35 [00:02<00:03, 5.25it/s]\n 46%|████▌ | 16/35 [00:03<00:03, 5.23it/s]\n 49%|████▊ | 17/35 [00:03<00:03, 5.25it/s]\n 51%|█████▏ | 18/35 [00:03<00:03, 5.27it/s]\n 54%|█████▍ | 19/35 [00:03<00:03, 5.29it/s]\n 57%|█████▋ | 20/35 [00:03<00:02, 5.28it/s]\n 60%|██████ | 21/35 [00:03<00:02, 5.29it/s]\n 63%|██████▎ | 22/35 [00:04<00:02, 5.29it/s]\n 66%|██████▌ | 23/35 [00:04<00:02, 5.30it/s]\n 69%|██████▊ | 24/35 [00:04<00:02, 5.30it/s]\n 71%|███████▏ | 25/35 [00:04<00:01, 5.30it/s]\n 74%|███████▍ | 26/35 [00:04<00:01, 5.31it/s]\n 77%|███████▋ | 27/35 [00:05<00:01, 5.30it/s]\n 80%|████████ | 28/35 [00:05<00:01, 5.30it/s]\n 83%|████████▎ | 29/35 [00:05<00:01, 5.30it/s]\n 86%|████████▌ | 30/35 [00:05<00:00, 5.30it/s]\n 89%|████████▊ | 31/35 [00:05<00:00, 5.30it/s]\n 91%|█████████▏| 32/35 [00:06<00:00, 5.30it/s]\n 94%|█████████▍| 33/35 [00:06<00:00, 5.31it/s]\n 97%|█████████▋| 34/35 [00:06<00:00, 5.30it/s]\n100%|██████████| 35/35 [00:06<00:00, 5.31it/s]\n100%|██████████| 35/35 [00:06<00:00, 5.30it/s]", "metrics": { "predict_time": 13.261047, "total_time": 13.351724 }, "output": [ "https://replicate.delivery/pbxt/f5mUlRLSuW0lfkxPFhbEKrziZV4qglmo3YxuURUisbxZhc4RA/out-0.png" ], "started_at": "2023-11-15T00:52:29.314393Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/mbkwjrlba4uu3d44j6ys3lt5ue", "cancel": "https://api.replicate.com/v1/predictions/mbkwjrlba4uu3d44j6ys3lt5ue/cancel" }, "version": "b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890" }
Generated inUsing seed: 50424 (122, 322, 382, 382) 0%| | 0/35 [00:00<?, ?it/s] 3%|▎ | 1/35 [00:00<00:06, 5.39it/s] 6%|▌ | 2/35 [00:00<00:06, 5.36it/s] 9%|▊ | 3/35 [00:00<00:05, 5.35it/s] 11%|█▏ | 4/35 [00:00<00:05, 5.34it/s] 14%|█▍ | 5/35 [00:00<00:05, 5.32it/s] 17%|█▋ | 6/35 [00:01<00:05, 5.33it/s] 20%|██ | 7/35 [00:01<00:05, 5.33it/s] 23%|██▎ | 8/35 [00:01<00:05, 5.33it/s] 26%|██▌ | 9/35 [00:01<00:04, 5.33it/s] 29%|██▊ | 10/35 [00:01<00:04, 5.31it/s] 31%|███▏ | 11/35 [00:02<00:04, 5.32it/s] 34%|███▍ | 12/35 [00:02<00:04, 5.31it/s] 37%|███▋ | 13/35 [00:02<00:04, 5.32it/s] 40%|████ | 14/35 [00:02<00:03, 5.31it/s] 43%|████▎ | 15/35 [00:02<00:03, 5.25it/s] 46%|████▌ | 16/35 [00:03<00:03, 5.23it/s] 49%|████▊ | 17/35 [00:03<00:03, 5.25it/s] 51%|█████▏ | 18/35 [00:03<00:03, 5.27it/s] 54%|█████▍ | 19/35 [00:03<00:03, 5.29it/s] 57%|█████▋ | 20/35 [00:03<00:02, 5.28it/s] 60%|██████ | 21/35 [00:03<00:02, 5.29it/s] 63%|██████▎ | 22/35 [00:04<00:02, 5.29it/s] 66%|██████▌ | 23/35 [00:04<00:02, 5.30it/s] 69%|██████▊ | 24/35 [00:04<00:02, 5.30it/s] 71%|███████▏ | 25/35 [00:04<00:01, 5.30it/s] 74%|███████▍ | 26/35 [00:04<00:01, 5.31it/s] 77%|███████▋ | 27/35 [00:05<00:01, 5.30it/s] 80%|████████ | 28/35 [00:05<00:01, 5.30it/s] 83%|████████▎ | 29/35 [00:05<00:01, 5.30it/s] 86%|████████▌ | 30/35 [00:05<00:00, 5.30it/s] 89%|████████▊ | 31/35 [00:05<00:00, 5.30it/s] 91%|█████████▏| 32/35 [00:06<00:00, 5.30it/s] 94%|█████████▍| 33/35 [00:06<00:00, 5.31it/s] 97%|█████████▋| 34/35 [00:06<00:00, 5.30it/s] 100%|██████████| 35/35 [00:06<00:00, 5.31it/s] 100%|██████████| 35/35 [00:06<00:00, 5.30it/s]
Prediction
lucataco/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890IDvduyqxdbychvzq2dkfchaao4omStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
{ "prompt": "", "strength": 0.2, "face_image": "https://replicate.delivery/pbxt/JsWesethw1pTKdZL8D5RV6SvmPC5HcWoZbfJ3fiyc30bVeFo/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWet2CRVsD5GZYpfHuBns0D3ccl83EqQdAxLucSIU6Pd85s/a.png" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; 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/JsWesethw1pTKdZL8D5RV6SvmPC5HcWoZbfJ3fiyc30bVeFo/ai_face2.png", blur_amount: 0, num_outputs: 1, source_image: "https://replicate.delivery/pbxt/JsWet2CRVsD5GZYpfHuBns0D3ccl83EqQdAxLucSIU6Pd85s/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.
Install Replicate’s Python client library:pip install replicate
Import the client: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/JsWesethw1pTKdZL8D5RV6SvmPC5HcWoZbfJ3fiyc30bVeFo/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWet2CRVsD5GZYpfHuBns0D3ccl83EqQdAxLucSIU6Pd85s/a.png" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
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/JsWesethw1pTKdZL8D5RV6SvmPC5HcWoZbfJ3fiyc30bVeFo/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWet2CRVsD5GZYpfHuBns0D3ccl83EqQdAxLucSIU6Pd85s/a.png" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-11-15T00:53:51.350251Z", "created_at": "2023-11-15T00:53:44.366583Z", "data_removed": false, "error": null, "id": "vduyqxdbychvzq2dkfchaao4om", "input": { "prompt": "", "strength": 0.2, "face_image": "https://replicate.delivery/pbxt/JsWesethw1pTKdZL8D5RV6SvmPC5HcWoZbfJ3fiyc30bVeFo/ai_face2.png", "blur_amount": 0, "num_outputs": 1, "source_image": "https://replicate.delivery/pbxt/JsWet2CRVsD5GZYpfHuBns0D3ccl83EqQdAxLucSIU6Pd85s/a.png" }, "logs": "Using seed: 23046\n(305, 142, 157, 157)\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:00, 9.46it/s]\n 20%|██ | 2/10 [00:00<00:00, 9.43it/s]\n 30%|███ | 3/10 [00:00<00:00, 9.43it/s]\n 40%|████ | 4/10 [00:00<00:00, 9.43it/s]\n 50%|█████ | 5/10 [00:00<00:00, 9.42it/s]\n 60%|██████ | 6/10 [00:00<00:00, 9.42it/s]\n 70%|███████ | 7/10 [00:00<00:00, 9.42it/s]\n 80%|████████ | 8/10 [00:00<00:00, 9.39it/s]\n 90%|█████████ | 9/10 [00:00<00:00, 9.37it/s]\n100%|██████████| 10/10 [00:01<00:00, 9.38it/s]\n100%|██████████| 10/10 [00:01<00:00, 9.40it/s]", "metrics": { "predict_time": 6.949742, "total_time": 6.983668 }, "output": [ "https://replicate.delivery/pbxt/kcSFQTB5Ko5bI1wGijz9jnzBup0NlglxhJifBSWnj6DPRO8IA/out-0.png" ], "started_at": "2023-11-15T00:53:44.400509Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/vduyqxdbychvzq2dkfchaao4om", "cancel": "https://api.replicate.com/v1/predictions/vduyqxdbychvzq2dkfchaao4om/cancel" }, "version": "b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890" }
Generated inUsing seed: 23046 (305, 142, 157, 157) 0%| | 0/10 [00:00<?, ?it/s] 10%|█ | 1/10 [00:00<00:00, 9.46it/s] 20%|██ | 2/10 [00:00<00:00, 9.43it/s] 30%|███ | 3/10 [00:00<00:00, 9.43it/s] 40%|████ | 4/10 [00:00<00:00, 9.43it/s] 50%|█████ | 5/10 [00:00<00:00, 9.42it/s] 60%|██████ | 6/10 [00:00<00:00, 9.42it/s] 70%|███████ | 7/10 [00:00<00:00, 9.42it/s] 80%|████████ | 8/10 [00:00<00:00, 9.39it/s] 90%|█████████ | 9/10 [00:00<00:00, 9.37it/s] 100%|██████████| 10/10 [00:01<00:00, 9.38it/s] 100%|██████████| 10/10 [00:01<00:00, 9.40it/s]
Prediction
lucataco/ip_adapter-face-inpaint:b199f118e2133894551cc59ff0777276e275cf64e9e8e0369ca6c4c599097890IDo2fcizdbvlav7fwunf5usfzjfyStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
{ "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" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; 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.
Install Replicate’s Python client library:pip install replicate
Import the client: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.
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.
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" }
Generated inUsing 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]
Want to make some of these yourself?
Run this model