typefile
{
"agree_to_research_only": true,
"face_image": "https://replicate.delivery/pbxt/K5DSwf3aUzIpS4srbRhNQkESybPovfXwEfjIuDMj3Dz86tDV/demo.png",
"height": 1024,
"negative_prompt": "monochrome, lowres, bad anatomy, worst quality, low quality, blurry, multiple people",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "photo of a woman in red dress in a garden",
"seed": 2212213399,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ORJ**********************************
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/ip-adapter-faceid 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-faceid:fb81ef963e74776af72e6f380949013533d46dd5c6228a9e586c57db6303d7cd",
{
input: {
agree_to_research_only: true,
face_image: "https://replicate.delivery/pbxt/K5DSwf3aUzIpS4srbRhNQkESybPovfXwEfjIuDMj3Dz86tDV/demo.png",
height: 1024,
negative_prompt: "monochrome, lowres, bad anatomy, worst quality, low quality, blurry, multiple people",
num_inference_steps: 30,
num_outputs: 1,
prompt: "photo of a woman in red dress in a garden",
seed: 2212213399,
width: 1024
}
}
);
// 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=r8_ORJ**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/ip-adapter-faceid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/ip-adapter-faceid:fb81ef963e74776af72e6f380949013533d46dd5c6228a9e586c57db6303d7cd",
input={
"agree_to_research_only": True,
"face_image": "https://replicate.delivery/pbxt/K5DSwf3aUzIpS4srbRhNQkESybPovfXwEfjIuDMj3Dz86tDV/demo.png",
"height": 1024,
"negative_prompt": "monochrome, lowres, bad anatomy, worst quality, low quality, blurry, multiple people",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "photo of a woman in red dress in a garden",
"seed": 2212213399,
"width": 1024
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_ORJ**********************************
This is your API token. Keep it to yourself.
Run lucataco/ip-adapter-faceid 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-faceid:fb81ef963e74776af72e6f380949013533d46dd5c6228a9e586c57db6303d7cd",
"input": {
"agree_to_research_only": true,
"face_image": "https://replicate.delivery/pbxt/K5DSwf3aUzIpS4srbRhNQkESybPovfXwEfjIuDMj3Dz86tDV/demo.png",
"height": 1024,
"negative_prompt": "monochrome, lowres, bad anatomy, worst quality, low quality, blurry, multiple people",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "photo of a woman in red dress in a garden",
"seed": 2212213399,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "yzcljc3bq3iap6xal2q3cpequy",
"model": "lucataco/ip-adapter-faceid",
"version": "fb81ef963e74776af72e6f380949013533d46dd5c6228a9e586c57db6303d7cd",
"input": {
"agree_to_research_only": true,
"face_image": "https://replicate.delivery/pbxt/K5DSwf3aUzIpS4srbRhNQkESybPovfXwEfjIuDMj3Dz86tDV/demo.png",
"height": 1024,
"negative_prompt": "monochrome, lowres, bad anatomy, worst quality, low quality, blurry, multiple people",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "photo of a woman in red dress in a garden",
"seed": 2212213399,
"width": 1024
},
"logs": "Using seed: 2212213399\nset det-size: (640, 640)\nwarning: det_size is already set in detection model, ignore\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:16, 1.73it/s]\n 7%|▋ | 2/30 [00:01<00:16, 1.73it/s]\n 10%|█ | 3/30 [00:01<00:15, 1.73it/s]\n 13%|█▎ | 4/30 [00:02<00:15, 1.73it/s]\n 17%|█▋ | 5/30 [00:02<00:14, 1.73it/s]\n 20%|██ | 6/30 [00:03<00:13, 1.72it/s]\n 23%|██▎ | 7/30 [00:04<00:13, 1.72it/s]\n 27%|██▋ | 8/30 [00:04<00:12, 1.72it/s]\n 30%|███ | 9/30 [00:05<00:12, 1.72it/s]\n 33%|███▎ | 10/30 [00:05<00:11, 1.72it/s]\n 37%|███▋ | 11/30 [00:06<00:11, 1.72it/s]\n 40%|████ | 12/30 [00:06<00:10, 1.72it/s]\n 43%|████▎ | 13/30 [00:07<00:09, 1.72it/s]\n 47%|████▋ | 14/30 [00:08<00:09, 1.72it/s]\n 50%|█████ | 15/30 [00:08<00:08, 1.72it/s]\n 53%|█████▎ | 16/30 [00:09<00:08, 1.72it/s]\n 57%|█████▋ | 17/30 [00:09<00:07, 1.72it/s]\n 60%|██████ | 18/30 [00:10<00:06, 1.72it/s]\n 63%|██████▎ | 19/30 [00:11<00:06, 1.72it/s]\n 67%|██████▋ | 20/30 [00:11<00:05, 1.72it/s]\n 70%|███████ | 21/30 [00:12<00:05, 1.72it/s]\n 73%|███████▎ | 22/30 [00:12<00:04, 1.72it/s]\n 77%|███████▋ | 23/30 [00:13<00:04, 1.72it/s]\n 80%|████████ | 24/30 [00:13<00:03, 1.72it/s]\n 83%|████████▎ | 25/30 [00:14<00:02, 1.72it/s]\n 87%|████████▋ | 26/30 [00:15<00:02, 1.72it/s]\n 90%|█████████ | 27/30 [00:15<00:01, 1.72it/s]\n 93%|█████████▎| 28/30 [00:16<00:01, 1.72it/s]\n 97%|█████████▋| 29/30 [00:16<00:00, 1.72it/s]\n100%|██████████| 30/30 [00:17<00:00, 1.72it/s]\n100%|██████████| 30/30 [00:17<00:00, 1.72it/s]",
"output": [
"https://replicate.delivery/pbxt/HAS5ByGkTaIYCprOe0Z0FPSs5zC3o2zYSHIMlO8CONrlXHCJA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-20T19:00:08.612807Z",
"started_at": "2023-12-20T19:00:08.650811Z",
"completed_at": "2023-12-20T19:00:27.97531Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/yzcljc3bq3iap6xal2q3cpequy/cancel",
"get": "https://api.replicate.com/v1/predictions/yzcljc3bq3iap6xal2q3cpequy"
},
"metrics": {
"predict_time": 19.324499,
"total_time": 19.362503
}
}
