You're looking at a specific version of this model. Jump to the model overview.
zsxkib /instant-id:6af8583c
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:6af8583c541261472e92155d87bba80d5ad98461665802f2ba196ac099aaedc9",
{
input: {
image: "https://replicate.delivery/pbxt/KMB8vhqlXLdAcElPz8lcQhtJrzzOzJEsdwWfkXAyuhotbKwq/meisje_met_de_parel.webp",
width: 640,
height: 640,
prompt: "masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished",
scheduler: "EulerDiscreteScheduler",
enable_lcm: false,
sdxl_weights: "nightvision-xl-0791",
pose_strength: 0.4,
canny_strength: 0.3,
depth_strength: 0.5,
guidance_scale: 5,
negative_prompt: "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
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: true,
enable_depth_controlnet: false,
lcm_num_inference_steps: 5,
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:6af8583c541261472e92155d87bba80d5ad98461665802f2ba196ac099aaedc9",
input={
"image": "https://replicate.delivery/pbxt/KMB8vhqlXLdAcElPz8lcQhtJrzzOzJEsdwWfkXAyuhotbKwq/meisje_met_de_parel.webp",
"width": 640,
"height": 640,
"prompt": "masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished",
"scheduler": "EulerDiscreteScheduler",
"enable_lcm": False,
"sdxl_weights": "nightvision-xl-0791",
"pose_strength": 0.4,
"canny_strength": 0.3,
"depth_strength": 0.5,
"guidance_scale": 5,
"negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
"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": True,
"enable_depth_controlnet": False,
"lcm_num_inference_steps": 5,
"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": "6af8583c541261472e92155d87bba80d5ad98461665802f2ba196ac099aaedc9",
"input": {
"image": "https://replicate.delivery/pbxt/KMB8vhqlXLdAcElPz8lcQhtJrzzOzJEsdwWfkXAyuhotbKwq/meisje_met_de_parel.webp",
"width": 640,
"height": 640,
"prompt": "masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished",
"scheduler": "EulerDiscreteScheduler",
"enable_lcm": false,
"sdxl_weights": "nightvision-xl-0791",
"pose_strength": 0.4,
"canny_strength": 0.3,
"depth_strength": 0.5,
"guidance_scale": 5,
"negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
"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": true,
"enable_depth_controlnet": false,
"lcm_num_inference_steps": 5,
"controlnet_conditioning_scale": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/zsxkib/instant-id@sha256:6af8583c541261472e92155d87bba80d5ad98461665802f2ba196ac099aaedc9 \
-i 'image="https://replicate.delivery/pbxt/KMB8vhqlXLdAcElPz8lcQhtJrzzOzJEsdwWfkXAyuhotbKwq/meisje_met_de_parel.webp"' \
-i 'width=640' \
-i 'height=640' \
-i 'prompt="masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished"' \
-i 'scheduler="EulerDiscreteScheduler"' \
-i 'enable_lcm=false' \
-i 'sdxl_weights="nightvision-xl-0791"' \
-i 'pose_strength=0.4' \
-i 'canny_strength=0.3' \
-i 'depth_strength=0.5' \
-i 'guidance_scale=5' \
-i 'negative_prompt="(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green"' \
-i 'ip_adapter_scale=0.8' \
-i 'lcm_guidance_scale=1.5' \
-i 'num_inference_steps=30' \
-i 'enable_pose_controlnet=true' \
-i 'enhance_nonface_region=true' \
-i 'enable_canny_controlnet=true' \
-i 'enable_depth_controlnet=false' \
-i 'lcm_num_inference_steps=5' \
-i 'controlnet_conditioning_scale=0.8'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/zsxkib/instant-id@sha256:6af8583c541261472e92155d87bba80d5ad98461665802f2ba196ac099aaedc9
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KMB8vhqlXLdAcElPz8lcQhtJrzzOzJEsdwWfkXAyuhotbKwq/meisje_met_de_parel.webp", "width": 640, "height": 640, "prompt": "masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished", "scheduler": "EulerDiscreteScheduler", "enable_lcm": false, "sdxl_weights": "nightvision-xl-0791", "pose_strength": 0.4, "canny_strength": 0.3, "depth_strength": 0.5, "guidance_scale": 5, "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green", "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": true, "enable_depth_controlnet": false, "lcm_num_inference_steps": 5, "controlnet_conditioning_scale": 0.8 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.015. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-02-06T14:05:12.172734Z",
"created_at": "2024-02-06T14:04:25.076266Z",
"data_removed": false,
"error": null,
"id": "r766fk3ban74fwagxopi7mqsxe",
"input": {
"image": "https://replicate.delivery/pbxt/KMB8vhqlXLdAcElPz8lcQhtJrzzOzJEsdwWfkXAyuhotbKwq/meisje_met_de_parel.webp",
"width": 640,
"height": 640,
"prompt": "masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished",
"scheduler": "EulerDiscreteScheduler",
"enable_lcm": false,
"sdxl_weights": "nightvision-xl-0791",
"pose_strength": 0.4,
"canny_strength": 0.3,
"depth_strength": 0.5,
"guidance_scale": 5,
"negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
"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": true,
"enable_depth_controlnet": false,
"lcm_num_inference_steps": 5,
"controlnet_conditioning_scale": 0.8
},
"logs": "Using seed: 31094\ndownloading url: https://weights.replicate.delivery/default/InstantID/models--stablediffusionapi--nightvision-xl-0791.tar\ndownloading to: checkpoints/models--stablediffusionapi--nightvision-xl-0791\n2024-02-06T14:04:25Z | INFO | [ Initiating ] dest=checkpoints/models--stablediffusionapi--nightvision-xl-0791 minimum_chunk_size=150M url=https://weights.replicate.delivery/default/InstantID/models--stablediffusionapi--nightvision-xl-0791.tar\n2024-02-06T14:04:33Z | INFO | [ Complete ] dest=checkpoints/models--stablediffusionapi--nightvision-xl-0791 size=\"6.9 GB\" total_elapsed=8.690s url=https://weights.replicate.delivery/default/InstantID/models--stablediffusionapi--nightvision-xl-0791.tar\ndownloading took: 9.307956218719482\n[~] Loading new SDXL weights: checkpoints/models--stablediffusionapi--nightvision-xl-0791/\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...: 14%|█▍ | 1/7 [00:00<00:02, 2.25it/s]\nLoading pipeline components...: 43%|████▎ | 3/7 [00:00<00:00, 5.65it/s]\nLoading pipeline components...: 57%|█████▋ | 4/7 [00:00<00:00, 4.84it/s]\nLoading pipeline components...: 86%|████████▌ | 6/7 [00:02<00:00, 1.65it/s]\nLoading pipeline components...: 100%|██████████| 7/7 [00:02<00:00, 2.42it/s]\n[~] Seting up LCM (just in case)\n/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/insightface/utils/transform.py:68: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.\nTo use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.\nP = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4\nStart inference...\n[Debug] Prompt: masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished,\n[Debug] Neg Prompt: (lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:16, 1.79it/s]\n 7%|▋ | 2/30 [00:01<00:15, 1.79it/s]\n 10%|█ | 3/30 [00:01<00:15, 1.79it/s]\n 13%|█▎ | 4/30 [00:02<00:14, 1.78it/s]\n 17%|█▋ | 5/30 [00:02<00:14, 1.78it/s]\n 20%|██ | 6/30 [00:03<00:13, 1.78it/s]\n 23%|██▎ | 7/30 [00:03<00:12, 1.78it/s]\n 27%|██▋ | 8/30 [00:04<00:12, 1.78it/s]\n 30%|███ | 9/30 [00:05<00:11, 1.78it/s]\n 33%|███▎ | 10/30 [00:05<00:11, 1.77it/s]\n 37%|███▋ | 11/30 [00:06<00:10, 1.77it/s]\n 40%|████ | 12/30 [00:06<00:10, 1.77it/s]\n 43%|████▎ | 13/30 [00:07<00:09, 1.77it/s]\n 47%|████▋ | 14/30 [00:07<00:09, 1.77it/s]\n 50%|█████ | 15/30 [00:08<00:08, 1.77it/s]\n 53%|█████▎ | 16/30 [00:09<00:07, 1.77it/s]\n 57%|█████▋ | 17/30 [00:09<00:07, 1.77it/s]\n 60%|██████ | 18/30 [00:10<00:06, 1.77it/s]\n 63%|██████▎ | 19/30 [00:10<00:06, 1.77it/s]\n 67%|██████▋ | 20/30 [00:11<00:05, 1.77it/s]\n 70%|███████ | 21/30 [00:11<00:05, 1.77it/s]\n 73%|███████▎ | 22/30 [00:12<00:04, 1.77it/s]\n 77%|███████▋ | 23/30 [00:12<00:03, 1.77it/s]\n 80%|████████ | 24/30 [00:13<00:03, 1.77it/s]\n 83%|████████▎ | 25/30 [00:14<00:02, 1.77it/s]\n 87%|████████▋ | 26/30 [00:14<00:02, 1.77it/s]\n 90%|█████████ | 27/30 [00:15<00:01, 1.77it/s]\n 93%|█████████▎| 28/30 [00:15<00:01, 1.77it/s]\n 97%|█████████▋| 29/30 [00:16<00:00, 1.77it/s]\n100%|██████████| 30/30 [00:16<00:00, 1.77it/s]\n100%|██████████| 30/30 [00:16<00:00, 1.77it/s]\nNSFW content detected: False",
"metrics": {
"predict_time": 47.065249,
"total_time": 47.096468
},
"output": [
"https://replicate.delivery/pbxt/AhtyoJfezztMUEvhkEXKKdeefqHLLqGF3emHkL7fQdIXLdfTSA/out_0.png"
],
"started_at": "2024-02-06T14:04:25.107485Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/r766fk3ban74fwagxopi7mqsxe",
"cancel": "https://api.replicate.com/v1/predictions/r766fk3ban74fwagxopi7mqsxe/cancel"
},
"version": "6af8583c541261472e92155d87bba80d5ad98461665802f2ba196ac099aaedc9"
}
Using seed: 31094
downloading url: https://weights.replicate.delivery/default/InstantID/models--stablediffusionapi--nightvision-xl-0791.tar
downloading to: checkpoints/models--stablediffusionapi--nightvision-xl-0791
2024-02-06T14:04:25Z | INFO | [ Initiating ] dest=checkpoints/models--stablediffusionapi--nightvision-xl-0791 minimum_chunk_size=150M url=https://weights.replicate.delivery/default/InstantID/models--stablediffusionapi--nightvision-xl-0791.tar
2024-02-06T14:04:33Z | INFO | [ Complete ] dest=checkpoints/models--stablediffusionapi--nightvision-xl-0791 size="6.9 GB" total_elapsed=8.690s url=https://weights.replicate.delivery/default/InstantID/models--stablediffusionapi--nightvision-xl-0791.tar
downloading took: 9.307956218719482
[~] Loading new SDXL weights: checkpoints/models--stablediffusionapi--nightvision-xl-0791/
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...: 14%|█▍ | 1/7 [00:00<00:02, 2.25it/s]
Loading pipeline components...: 43%|████▎ | 3/7 [00:00<00:00, 5.65it/s]
Loading pipeline components...: 57%|█████▋ | 4/7 [00:00<00:00, 4.84it/s]
Loading pipeline components...: 86%|████████▌ | 6/7 [00:02<00:00, 1.65it/s]
Loading pipeline components...: 100%|██████████| 7/7 [00:02<00:00, 2.42it/s]
[~] Seting up LCM (just in case)
/root/.pyenv/versions/3.11.7/lib/python3.11/site-packages/insightface/utils/transform.py:68: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4
Start inference...
[Debug] Prompt: masterpiece painting, buildings in the backdrop, kaleidoscope, lilac orange blue cream fuchsia bright vivid gradient colors, the scene is cinematic, picture of woman, emotional realism, double exposure, watercolor ink pencil, graded wash, color layering, magic realism, figurative painting, intricate motifs, organic tracery, polished,
[Debug] Neg Prompt: (lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:00<00:16, 1.79it/s]
7%|▋ | 2/30 [00:01<00:15, 1.79it/s]
10%|█ | 3/30 [00:01<00:15, 1.79it/s]
13%|█▎ | 4/30 [00:02<00:14, 1.78it/s]
17%|█▋ | 5/30 [00:02<00:14, 1.78it/s]
20%|██ | 6/30 [00:03<00:13, 1.78it/s]
23%|██▎ | 7/30 [00:03<00:12, 1.78it/s]
27%|██▋ | 8/30 [00:04<00:12, 1.78it/s]
30%|███ | 9/30 [00:05<00:11, 1.78it/s]
33%|███▎ | 10/30 [00:05<00:11, 1.77it/s]
37%|███▋ | 11/30 [00:06<00:10, 1.77it/s]
40%|████ | 12/30 [00:06<00:10, 1.77it/s]
43%|████▎ | 13/30 [00:07<00:09, 1.77it/s]
47%|████▋ | 14/30 [00:07<00:09, 1.77it/s]
50%|█████ | 15/30 [00:08<00:08, 1.77it/s]
53%|█████▎ | 16/30 [00:09<00:07, 1.77it/s]
57%|█████▋ | 17/30 [00:09<00:07, 1.77it/s]
60%|██████ | 18/30 [00:10<00:06, 1.77it/s]
63%|██████▎ | 19/30 [00:10<00:06, 1.77it/s]
67%|██████▋ | 20/30 [00:11<00:05, 1.77it/s]
70%|███████ | 21/30 [00:11<00:05, 1.77it/s]
73%|███████▎ | 22/30 [00:12<00:04, 1.77it/s]
77%|███████▋ | 23/30 [00:12<00:03, 1.77it/s]
80%|████████ | 24/30 [00:13<00:03, 1.77it/s]
83%|████████▎ | 25/30 [00:14<00:02, 1.77it/s]
87%|████████▋ | 26/30 [00:14<00:02, 1.77it/s]
90%|█████████ | 27/30 [00:15<00:01, 1.77it/s]
93%|█████████▎| 28/30 [00:15<00:01, 1.77it/s]
97%|█████████▋| 29/30 [00:16<00:00, 1.77it/s]
100%|██████████| 30/30 [00:16<00:00, 1.77it/s]
100%|██████████| 30/30 [00:16<00:00, 1.77it/s]
NSFW content detected: False