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:2e4785a4
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:2e4785a4d80dadf580077b2244c8d7c05d8e3faac04a04c02d8e099dd2876789",
{
input: {
image: "https://replicate.delivery/pbxt/KIIutO7jIleskKaWebhvurgBUlHR6M6KN7KHaMMWSt4OnVrF/musk_resize.jpeg",
prompt: "analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality",
scheduler: "EulerDiscreteScheduler",
enable_lcm: false,
pose_image: "https://replicate.delivery/pbxt/KJmFdQRQVDXGDVdVXftLvFrrvgOPXXRXbzIVEyExPYYOFPyF/80048a6e6586759dbcb529e74a9042ca.jpeg",
num_outputs: 1,
sdxl_weights: "protovision-xl-high-fidel",
output_format: "webp",
pose_strength: 0.4,
canny_strength: 0.3,
depth_strength: 0.5,
guidance_scale: 5,
output_quality: 80,
negative_prompt: "(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,
lcm_guidance_scale: 1.5,
num_inference_steps: 30,
enable_pose_controlnet: true,
enhance_nonface_region: true,
enable_canny_controlnet: false,
enable_depth_controlnet: false,
lcm_num_inference_steps: 5,
face_detection_input_width: 640,
face_detection_input_height: 640,
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:2e4785a4d80dadf580077b2244c8d7c05d8e3faac04a04c02d8e099dd2876789",
input={
"image": "https://replicate.delivery/pbxt/KIIutO7jIleskKaWebhvurgBUlHR6M6KN7KHaMMWSt4OnVrF/musk_resize.jpeg",
"prompt": "analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality",
"scheduler": "EulerDiscreteScheduler",
"enable_lcm": False,
"pose_image": "https://replicate.delivery/pbxt/KJmFdQRQVDXGDVdVXftLvFrrvgOPXXRXbzIVEyExPYYOFPyF/80048a6e6586759dbcb529e74a9042ca.jpeg",
"num_outputs": 1,
"sdxl_weights": "protovision-xl-high-fidel",
"output_format": "webp",
"pose_strength": 0.4,
"canny_strength": 0.3,
"depth_strength": 0.5,
"guidance_scale": 5,
"output_quality": 80,
"negative_prompt": "(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,
"lcm_guidance_scale": 1.5,
"num_inference_steps": 30,
"enable_pose_controlnet": True,
"enhance_nonface_region": True,
"enable_canny_controlnet": False,
"enable_depth_controlnet": False,
"lcm_num_inference_steps": 5,
"face_detection_input_width": 640,
"face_detection_input_height": 640,
"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": "2e4785a4d80dadf580077b2244c8d7c05d8e3faac04a04c02d8e099dd2876789",
"input": {
"image": "https://replicate.delivery/pbxt/KIIutO7jIleskKaWebhvurgBUlHR6M6KN7KHaMMWSt4OnVrF/musk_resize.jpeg",
"prompt": "analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality",
"scheduler": "EulerDiscreteScheduler",
"enable_lcm": false,
"pose_image": "https://replicate.delivery/pbxt/KJmFdQRQVDXGDVdVXftLvFrrvgOPXXRXbzIVEyExPYYOFPyF/80048a6e6586759dbcb529e74a9042ca.jpeg",
"num_outputs": 1,
"sdxl_weights": "protovision-xl-high-fidel",
"output_format": "webp",
"pose_strength": 0.4,
"canny_strength": 0.3,
"depth_strength": 0.5,
"guidance_scale": 5,
"output_quality": 80,
"negative_prompt": "(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,
"lcm_guidance_scale": 1.5,
"num_inference_steps": 30,
"enable_pose_controlnet": true,
"enhance_nonface_region": true,
"enable_canny_controlnet": false,
"enable_depth_controlnet": false,
"lcm_num_inference_steps": 5,
"face_detection_input_width": 640,
"face_detection_input_height": 640,
"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-05-30T14:08:04.881557Z",
"created_at": "2024-05-30T14:07:28.818000Z",
"data_removed": false,
"error": null,
"id": "nqgnbwp069rgg0cfs79rpergec",
"input": {
"image": "https://replicate.delivery/pbxt/KIIutO7jIleskKaWebhvurgBUlHR6M6KN7KHaMMWSt4OnVrF/musk_resize.jpeg",
"prompt": "analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality",
"scheduler": "EulerDiscreteScheduler",
"enable_lcm": false,
"pose_image": "https://replicate.delivery/pbxt/KJmFdQRQVDXGDVdVXftLvFrrvgOPXXRXbzIVEyExPYYOFPyF/80048a6e6586759dbcb529e74a9042ca.jpeg",
"num_outputs": 1,
"sdxl_weights": "protovision-xl-high-fidel",
"output_format": "webp",
"pose_strength": 0.4,
"canny_strength": 0.3,
"depth_strength": 0.5,
"guidance_scale": 5,
"output_quality": 80,
"negative_prompt": "(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,
"lcm_guidance_scale": 1.5,
"num_inference_steps": 30,
"enable_pose_controlnet": true,
"enhance_nonface_region": true,
"enable_canny_controlnet": false,
"enable_depth_controlnet": false,
"lcm_num_inference_steps": 5,
"face_detection_input_width": 640,
"face_detection_input_height": 640,
"controlnet_conditioning_scale": 0.8
},
"logs": "Using seed: 25815\n[~] Loading new SDXL weights: checkpoints/models--stablediffusionapi--protovision-xl-high-fidel/\nKeyword arguments {'safety_checker': None} are not expected by StableDiffusionXLInstantIDPipeline and will be ignored.\nLoading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]\nLoading pipeline components...: 29%|██▊ | 2/7 [00:00<00:00, 5.96it/s]\nLoading pipeline components...: 43%|████▎ | 3/7 [00:00<00:01, 3.94it/s]\nLoading pipeline components...: 71%|███████▏ | 5/7 [00:04<00:02, 1.15s/it]\nLoading pipeline components...: 100%|██████████| 7/7 [00:04<00:00, 1.48it/s]\nLoading pipeline components...: 100%|██████████| 7/7 [00:04<00:00, 1.50it/s]\n[~] Seting up LCM (just in case)\nStart inference...\n[Debug] Prompt: analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality,\n[Debug] Neg Prompt: (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\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:07, 4.12it/s]\n 7%|▋ | 2/30 [00:00<00:06, 4.12it/s]\n 10%|█ | 3/30 [00:00<00:06, 4.13it/s]\n 13%|█▎ | 4/30 [00:00<00:06, 4.12it/s]\n 17%|█▋ | 5/30 [00:01<00:06, 4.12it/s]\n 20%|██ | 6/30 [00:01<00:05, 4.12it/s]\n 23%|██▎ | 7/30 [00:01<00:05, 4.12it/s]\n 27%|██▋ | 8/30 [00:01<00:05, 4.12it/s]\n 30%|███ | 9/30 [00:02<00:05, 4.12it/s]\n 33%|███▎ | 10/30 [00:02<00:04, 4.12it/s]\n 37%|███▋ | 11/30 [00:02<00:04, 4.12it/s]\n 40%|████ | 12/30 [00:02<00:04, 4.12it/s]\n 43%|████▎ | 13/30 [00:03<00:04, 4.12it/s]\n 47%|████▋ | 14/30 [00:03<00:03, 4.12it/s]\n 50%|█████ | 15/30 [00:03<00:03, 4.12it/s]\n 53%|█████▎ | 16/30 [00:03<00:03, 4.12it/s]\n 57%|█████▋ | 17/30 [00:04<00:03, 4.12it/s]\n 60%|██████ | 18/30 [00:04<00:02, 4.12it/s]\n 63%|██████▎ | 19/30 [00:04<00:02, 4.11it/s]\n 67%|██████▋ | 20/30 [00:04<00:02, 4.11it/s]\n 70%|███████ | 21/30 [00:05<00:02, 4.10it/s]\n 73%|███████▎ | 22/30 [00:05<00:01, 4.10it/s]\n 77%|███████▋ | 23/30 [00:05<00:01, 4.10it/s]\n 80%|████████ | 24/30 [00:05<00:01, 4.09it/s]\n 83%|████████▎ | 25/30 [00:06<00:01, 4.10it/s]\n 87%|████████▋ | 26/30 [00:06<00:00, 4.10it/s]\n 90%|█████████ | 27/30 [00:06<00:00, 4.10it/s]\n 93%|█████████▎| 28/30 [00:06<00:00, 4.09it/s]\n 97%|█████████▋| 29/30 [00:07<00:00, 4.09it/s]\n100%|██████████| 30/30 [00:07<00:00, 4.09it/s]\n100%|██████████| 30/30 [00:07<00:00, 4.11it/s]\nNSFW content detected: False\n[~] Saving to /tmp/out_0.webp...\n[~] Output format: WEBP\n[~] Output quality: 80",
"metrics": {
"predict_time": 36.017849,
"total_time": 36.063557
},
"output": [
"https://replicate.delivery/pbxt/J6l9A4W5SWK6NNTh9XXln5N6mk9Ge9FfMlC547bLezyISHzlA/out_0.webp"
],
"started_at": "2024-05-30T14:07:28.863708Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/nqgnbwp069rgg0cfs79rpergec",
"cancel": "https://api.replicate.com/v1/predictions/nqgnbwp069rgg0cfs79rpergec/cancel"
},
"version": "f1ca369da43885a347690a98f6b710afbf5f167cb9bf13bd5af512ba4a9f7b63"
}
Using seed: 25815
[~] Loading new SDXL weights: checkpoints/models--stablediffusionapi--protovision-xl-high-fidel/
Keyword arguments {'safety_checker': None} are not expected by StableDiffusionXLInstantIDPipeline and will be ignored.
Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]
Loading pipeline components...: 29%|██▊ | 2/7 [00:00<00:00, 5.96it/s]
Loading pipeline components...: 43%|████▎ | 3/7 [00:00<00:01, 3.94it/s]
Loading pipeline components...: 71%|███████▏ | 5/7 [00:04<00:02, 1.15s/it]
Loading pipeline components...: 100%|██████████| 7/7 [00:04<00:00, 1.48it/s]
Loading pipeline components...: 100%|██████████| 7/7 [00:04<00:00, 1.50it/s]
[~] Seting up LCM (just in case)
Start inference...
[Debug] Prompt: analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality,
[Debug] Neg Prompt: (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
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:07, 4.12it/s]
7%|▋ | 2/30 [00:00<00:06, 4.12it/s]
10%|█ | 3/30 [00:00<00:06, 4.13it/s]
13%|█▎ | 4/30 [00:00<00:06, 4.12it/s]
17%|█▋ | 5/30 [00:01<00:06, 4.12it/s]
20%|██ | 6/30 [00:01<00:05, 4.12it/s]
23%|██▎ | 7/30 [00:01<00:05, 4.12it/s]
27%|██▋ | 8/30 [00:01<00:05, 4.12it/s]
30%|███ | 9/30 [00:02<00:05, 4.12it/s]
33%|███▎ | 10/30 [00:02<00:04, 4.12it/s]
37%|███▋ | 11/30 [00:02<00:04, 4.12it/s]
40%|████ | 12/30 [00:02<00:04, 4.12it/s]
43%|████▎ | 13/30 [00:03<00:04, 4.12it/s]
47%|████▋ | 14/30 [00:03<00:03, 4.12it/s]
50%|█████ | 15/30 [00:03<00:03, 4.12it/s]
53%|█████▎ | 16/30 [00:03<00:03, 4.12it/s]
57%|█████▋ | 17/30 [00:04<00:03, 4.12it/s]
60%|██████ | 18/30 [00:04<00:02, 4.12it/s]
63%|██████▎ | 19/30 [00:04<00:02, 4.11it/s]
67%|██████▋ | 20/30 [00:04<00:02, 4.11it/s]
70%|███████ | 21/30 [00:05<00:02, 4.10it/s]
73%|███████▎ | 22/30 [00:05<00:01, 4.10it/s]
77%|███████▋ | 23/30 [00:05<00:01, 4.10it/s]
80%|████████ | 24/30 [00:05<00:01, 4.09it/s]
83%|████████▎ | 25/30 [00:06<00:01, 4.10it/s]
87%|████████▋ | 26/30 [00:06<00:00, 4.10it/s]
90%|█████████ | 27/30 [00:06<00:00, 4.10it/s]
93%|█████████▎| 28/30 [00:06<00:00, 4.09it/s]
97%|█████████▋| 29/30 [00:07<00:00, 4.09it/s]
100%|██████████| 30/30 [00:07<00:00, 4.09it/s]
100%|██████████| 30/30 [00:07<00:00, 4.11it/s]
NSFW content detected: False
[~] Saving to /tmp/out_0.webp...
[~] Output format: WEBP
[~] Output quality: 80
This example was created by a different version, zsxkib/instant-id:f1ca369d.