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 /instant-id:4a86d2bc
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zsxkib/instant-id using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsxkib/instant-id:4a86d2bcb78e94f5fcda66492b1acdf8781b252fbe55714fb67b30e66c4512f4",
{
input: {
image: "https://replicate.delivery/pbxt/KI4a4NSCc0sAFMdlbD4n8ufHLXb2utKIwwbQff0M2ryhGJPJ/pp_0.jpg",
width: 640,
height: 640,
prompt: "4k photo of a man. highly detailed, best quality, shallow depth of field, fuji film",
sdxl_weights: "stable-diffusion-xl-base-1.0",
guidance_scale: 5,
negative_prompt: "ugly, (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch,deformed, mutated, cross-eyed, ugly, disfigured",
ip_adapter_scale: 0.8,
num_inference_steps: 30,
controlnet_conditioning_scale: 0.8
}
}
);
console.log(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/instant-id using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/instant-id:4a86d2bcb78e94f5fcda66492b1acdf8781b252fbe55714fb67b30e66c4512f4",
input={
"image": "https://replicate.delivery/pbxt/KI4a4NSCc0sAFMdlbD4n8ufHLXb2utKIwwbQff0M2ryhGJPJ/pp_0.jpg",
"width": 640,
"height": 640,
"prompt": "4k photo of a man. highly detailed, best quality, shallow depth of field, fuji film",
"sdxl_weights": "stable-diffusion-xl-base-1.0",
"guidance_scale": 5,
"negative_prompt": "ugly, (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch,deformed, mutated, cross-eyed, ugly, disfigured",
"ip_adapter_scale": 0.8,
"num_inference_steps": 30,
"controlnet_conditioning_scale": 0.8
}
)
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/instant-id 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": "4a86d2bcb78e94f5fcda66492b1acdf8781b252fbe55714fb67b30e66c4512f4",
"input": {
"image": "https://replicate.delivery/pbxt/KI4a4NSCc0sAFMdlbD4n8ufHLXb2utKIwwbQff0M2ryhGJPJ/pp_0.jpg",
"width": 640,
"height": 640,
"prompt": "4k photo of a man. highly detailed, best quality, shallow depth of field, fuji film",
"sdxl_weights": "stable-diffusion-xl-base-1.0",
"guidance_scale": 5,
"negative_prompt": "ugly, (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch,deformed, mutated, cross-eyed, ugly, disfigured",
"ip_adapter_scale": 0.8,
"num_inference_steps": 30,
"controlnet_conditioning_scale": 0.8
}
}' \
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-01-26T00:14:36.234677Z",
"created_at": "2024-01-26T00:14:18.514716Z",
"data_removed": false,
"error": null,
"id": "tzqpu7tbuxxeq4u2j7xrpwmymq",
"input": {
"image": "https://replicate.delivery/pbxt/KI4a4NSCc0sAFMdlbD4n8ufHLXb2utKIwwbQff0M2ryhGJPJ/pp_0.jpg",
"width": 640,
"height": 640,
"prompt": "4k photo of a man. highly detailed, best quality, shallow depth of field, fuji film",
"sdxl_weights": "stable-diffusion-xl-base-1.0",
"guidance_scale": 5,
"negative_prompt": "ugly, (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch,deformed, mutated, cross-eyed, ugly, disfigured",
"ip_adapter_scale": 0.8,
"num_inference_steps": 30,
"controlnet_conditioning_scale": 0.8
},
"logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:10, 2.79it/s]\n 7%|▋ | 2/30 [00:00<00:09, 2.89it/s]\n 10%|█ | 3/30 [00:01<00:09, 2.92it/s]\n 13%|█▎ | 4/30 [00:01<00:08, 2.94it/s]\n 17%|█▋ | 5/30 [00:01<00:08, 2.95it/s]\n 20%|██ | 6/30 [00:02<00:08, 2.95it/s]\n 23%|██▎ | 7/30 [00:02<00:07, 2.96it/s]\n 27%|██▋ | 8/30 [00:02<00:07, 2.96it/s]\n 30%|███ | 9/30 [00:03<00:07, 2.96it/s]\n 33%|███▎ | 10/30 [00:03<00:06, 2.96it/s]\n 37%|███▋ | 11/30 [00:03<00:06, 2.96it/s]\n 40%|████ | 12/30 [00:04<00:06, 2.95it/s]\n 43%|████▎ | 13/30 [00:04<00:05, 2.96it/s]\n 47%|████▋ | 14/30 [00:04<00:05, 2.96it/s]\n 50%|█████ | 15/30 [00:05<00:05, 2.96it/s]\n 53%|█████▎ | 16/30 [00:05<00:04, 2.96it/s]\n 57%|█████▋ | 17/30 [00:05<00:04, 2.96it/s]\n 60%|██████ | 18/30 [00:06<00:04, 2.95it/s]\n 63%|██████▎ | 19/30 [00:06<00:03, 2.95it/s]\n 67%|██████▋ | 20/30 [00:06<00:03, 2.96it/s]\n 70%|███████ | 21/30 [00:07<00:03, 2.97it/s]\n 73%|███████▎ | 22/30 [00:07<00:02, 2.97it/s]\n 77%|███████▋ | 23/30 [00:07<00:02, 2.97it/s]\n 80%|████████ | 24/30 [00:08<00:02, 2.97it/s]\n 83%|████████▎ | 25/30 [00:08<00:01, 2.97it/s]\n 87%|████████▋ | 26/30 [00:08<00:01, 2.97it/s]\n 90%|█████████ | 27/30 [00:09<00:01, 2.97it/s]\n 93%|█████████▎| 28/30 [00:09<00:00, 2.96it/s]\n 97%|█████████▋| 29/30 [00:09<00:00, 2.96it/s]\n100%|██████████| 30/30 [00:10<00:00, 2.97it/s]\n100%|██████████| 30/30 [00:10<00:00, 2.96it/s]",
"metrics": {
"predict_time": 17.633786,
"total_time": 17.719961
},
"output": "https://replicate.delivery/pbxt/Wnbjkn351EbjOBTZi4a8RR0MQ7KJyxSG7K32NefeHbrXbVgkA/result.jpg",
"started_at": "2024-01-26T00:14:18.600891Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/tzqpu7tbuxxeq4u2j7xrpwmymq",
"cancel": "https://api.replicate.com/v1/predictions/tzqpu7tbuxxeq4u2j7xrpwmymq/cancel"
},
"version": "4a86d2bcb78e94f5fcda66492b1acdf8781b252fbe55714fb67b30e66c4512f4"
}
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:10, 2.79it/s]
7%|▋ | 2/30 [00:00<00:09, 2.89it/s]
10%|█ | 3/30 [00:01<00:09, 2.92it/s]
13%|█▎ | 4/30 [00:01<00:08, 2.94it/s]
17%|█▋ | 5/30 [00:01<00:08, 2.95it/s]
20%|██ | 6/30 [00:02<00:08, 2.95it/s]
23%|██▎ | 7/30 [00:02<00:07, 2.96it/s]
27%|██▋ | 8/30 [00:02<00:07, 2.96it/s]
30%|███ | 9/30 [00:03<00:07, 2.96it/s]
33%|███▎ | 10/30 [00:03<00:06, 2.96it/s]
37%|███▋ | 11/30 [00:03<00:06, 2.96it/s]
40%|████ | 12/30 [00:04<00:06, 2.95it/s]
43%|████▎ | 13/30 [00:04<00:05, 2.96it/s]
47%|████▋ | 14/30 [00:04<00:05, 2.96it/s]
50%|█████ | 15/30 [00:05<00:05, 2.96it/s]
53%|█████▎ | 16/30 [00:05<00:04, 2.96it/s]
57%|█████▋ | 17/30 [00:05<00:04, 2.96it/s]
60%|██████ | 18/30 [00:06<00:04, 2.95it/s]
63%|██████▎ | 19/30 [00:06<00:03, 2.95it/s]
67%|██████▋ | 20/30 [00:06<00:03, 2.96it/s]
70%|███████ | 21/30 [00:07<00:03, 2.97it/s]
73%|███████▎ | 22/30 [00:07<00:02, 2.97it/s]
77%|███████▋ | 23/30 [00:07<00:02, 2.97it/s]
80%|████████ | 24/30 [00:08<00:02, 2.97it/s]
83%|████████▎ | 25/30 [00:08<00:01, 2.97it/s]
87%|████████▋ | 26/30 [00:08<00:01, 2.97it/s]
90%|█████████ | 27/30 [00:09<00:01, 2.97it/s]
93%|█████████▎| 28/30 [00:09<00:00, 2.96it/s]
97%|█████████▋| 29/30 [00:09<00:00, 2.96it/s]
100%|██████████| 30/30 [00:10<00:00, 2.97it/s]
100%|██████████| 30/30 [00:10<00:00, 2.96it/s]