grandlineai
/
instant-id-photorealistic
InstantID : Zero-shot Identity-Preserving Generation in Seconds. Using Juggernaut-XL v8 as the base model to encourage photorealism
Prediction
grandlineai/instant-id-photorealistic:03914a0cIDr4hhsklbyp5opajiuvh5mho7aeStatusSucceededSourceWebHardwareA40Total durationCreatedInput
- width
- 640
- height
- 640
- prompt
- Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality
- guidance_scale
- 5
- negative_prompt
- older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands
- ip_adapter_scale
- 0.8
- num_inference_steps
- 30
- controlnet_conditioning_scale
- 0.8
{ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.8 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", { input: { image: "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", width: 640, height: 640, prompt: "Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality", guidance_scale: 5, negative_prompt: "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", 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.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", input={ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "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.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run grandlineai/instant-id-photorealistic 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": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "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.
You can run this model locally using Cog. First, install Cog: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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279 \ -i 'image="https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png"' \ -i 'width=640' \ -i 'height=640' \ -i 'prompt="Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality"' \ -i 'guidance_scale=5' \ -i 'negative_prompt="older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands"' \ -i 'ip_adapter_scale=0.8' \ -i 'num_inference_steps=30' \ -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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.8 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-01-24T08:28:26.011023Z", "created_at": "2024-01-24T08:25:02.088377Z", "data_removed": false, "error": null, "id": "r4hhsklbyp5opajiuvh5mho7ae", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "Create an image of a happy woman in soft pastel clothes under blooming cherry blossom trees. The scene is filled with soft high_key lighting, highlighting the gentle rose petals and happy expressions on their faces. The composition should have a shallow depth of field and a romantic spring atmosphere, high quality", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.8 }, "logs": "/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\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:28, 1.01it/s]\n 7%|▋ | 2/30 [00:01<00:22, 1.23it/s]\n 10%|█ | 3/30 [00:02<00:20, 1.33it/s]\n 13%|█▎ | 4/30 [00:03<00:18, 1.37it/s]\n 17%|█▋ | 5/30 [00:03<00:17, 1.40it/s]\n 20%|██ | 6/30 [00:04<00:16, 1.42it/s]\n 23%|██▎ | 7/30 [00:05<00:16, 1.43it/s]\n 27%|██▋ | 8/30 [00:05<00:15, 1.44it/s]\n 30%|███ | 9/30 [00:06<00:14, 1.44it/s]\n 33%|███▎ | 10/30 [00:07<00:13, 1.45it/s]\n 37%|███▋ | 11/30 [00:07<00:13, 1.45it/s]\n 40%|████ | 12/30 [00:08<00:12, 1.45it/s]\n 43%|████▎ | 13/30 [00:09<00:11, 1.45it/s]\n 47%|████▋ | 14/30 [00:09<00:10, 1.46it/s]\n 50%|█████ | 15/30 [00:10<00:10, 1.46it/s]\n 53%|█████▎ | 16/30 [00:11<00:09, 1.46it/s]\n 57%|█████▋ | 17/30 [00:11<00:08, 1.46it/s]\n 60%|██████ | 18/30 [00:12<00:08, 1.46it/s]\n 63%|██████▎ | 19/30 [00:13<00:07, 1.46it/s]\n 67%|██████▋ | 20/30 [00:14<00:06, 1.46it/s]\n 70%|███████ | 21/30 [00:14<00:06, 1.46it/s]\n 73%|███████▎ | 22/30 [00:15<00:05, 1.45it/s]\n 77%|███████▋ | 23/30 [00:16<00:04, 1.46it/s]\n 80%|████████ | 24/30 [00:16<00:04, 1.46it/s]\n 83%|████████▎ | 25/30 [00:17<00:03, 1.46it/s]\n 87%|████████▋ | 26/30 [00:18<00:02, 1.46it/s]\n 90%|█████████ | 27/30 [00:18<00:02, 1.45it/s]\n 93%|█████████▎| 28/30 [00:19<00:01, 1.45it/s]\n 97%|█████████▋| 29/30 [00:20<00:00, 1.45it/s]\n100%|██████████| 30/30 [00:20<00:00, 1.45it/s]\n100%|██████████| 30/30 [00:20<00:00, 1.43it/s]", "metrics": { "predict_time": 37.338348, "total_time": 203.922646 }, "output": "https://replicate.delivery/pbxt/80mpaXLe0m3CBKrK3FRAolhffkCezB0cq0fVeT17Aa4SK85jE/result.jpg", "started_at": "2024-01-24T08:27:48.672675Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/r4hhsklbyp5opajiuvh5mho7ae", "cancel": "https://api.replicate.com/v1/predictions/r4hhsklbyp5opajiuvh5mho7ae/cancel" }, "version": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279" }
Generated in/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 0%| | 0/30 [00:00<?, ?it/s] 3%|▎ | 1/30 [00:00<00:28, 1.01it/s] 7%|▋ | 2/30 [00:01<00:22, 1.23it/s] 10%|█ | 3/30 [00:02<00:20, 1.33it/s] 13%|█▎ | 4/30 [00:03<00:18, 1.37it/s] 17%|█▋ | 5/30 [00:03<00:17, 1.40it/s] 20%|██ | 6/30 [00:04<00:16, 1.42it/s] 23%|██▎ | 7/30 [00:05<00:16, 1.43it/s] 27%|██▋ | 8/30 [00:05<00:15, 1.44it/s] 30%|███ | 9/30 [00:06<00:14, 1.44it/s] 33%|███▎ | 10/30 [00:07<00:13, 1.45it/s] 37%|███▋ | 11/30 [00:07<00:13, 1.45it/s] 40%|████ | 12/30 [00:08<00:12, 1.45it/s] 43%|████▎ | 13/30 [00:09<00:11, 1.45it/s] 47%|████▋ | 14/30 [00:09<00:10, 1.46it/s] 50%|█████ | 15/30 [00:10<00:10, 1.46it/s] 53%|█████▎ | 16/30 [00:11<00:09, 1.46it/s] 57%|█████▋ | 17/30 [00:11<00:08, 1.46it/s] 60%|██████ | 18/30 [00:12<00:08, 1.46it/s] 63%|██████▎ | 19/30 [00:13<00:07, 1.46it/s] 67%|██████▋ | 20/30 [00:14<00:06, 1.46it/s] 70%|███████ | 21/30 [00:14<00:06, 1.46it/s] 73%|███████▎ | 22/30 [00:15<00:05, 1.45it/s] 77%|███████▋ | 23/30 [00:16<00:04, 1.46it/s] 80%|████████ | 24/30 [00:16<00:04, 1.46it/s] 83%|████████▎ | 25/30 [00:17<00:03, 1.46it/s] 87%|████████▋ | 26/30 [00:18<00:02, 1.46it/s] 90%|█████████ | 27/30 [00:18<00:02, 1.45it/s] 93%|█████████▎| 28/30 [00:19<00:01, 1.45it/s] 97%|█████████▋| 29/30 [00:20<00:00, 1.45it/s] 100%|██████████| 30/30 [00:20<00:00, 1.45it/s] 100%|██████████| 30/30 [00:20<00:00, 1.43it/s]
Prediction
grandlineai/instant-id-photorealistic:03914a0cIDzlv6rxdbklwsymynw4teh7b4a4StatusSucceededSourceWebHardwareA40Total durationCreatedInput
- width
- 640
- height
- 640
- prompt
- A professional headshot of a business woman, studio quality, cinematic shot
- guidance_scale
- 5
- negative_prompt
- older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands
- ip_adapter_scale
- 0.8
- num_inference_steps
- 30
- controlnet_conditioning_scale
- 0.6
{ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "A professional headshot of a business woman, studio quality, cinematic shot", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", { input: { image: "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", width: 640, height: 640, prompt: "A professional headshot of a business woman, studio quality, cinematic shot", guidance_scale: 5, negative_prompt: "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", ip_adapter_scale: 0.8, num_inference_steps: 30, controlnet_conditioning_scale: 0.6 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", input={ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "A professional headshot of a business woman, studio quality, cinematic shot", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run grandlineai/instant-id-photorealistic 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": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "A professional headshot of a business woman, studio quality, cinematic shot", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279 \ -i 'image="https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png"' \ -i 'width=640' \ -i 'height=640' \ -i 'prompt="A professional headshot of a business woman, studio quality, cinematic shot"' \ -i 'guidance_scale=5' \ -i 'negative_prompt="older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands"' \ -i 'ip_adapter_scale=0.8' \ -i 'num_inference_steps=30' \ -i 'controlnet_conditioning_scale=0.6'
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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "A professional headshot of a business woman, studio quality, cinematic shot", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-01-24T17:57:57.345290Z", "created_at": "2024-01-24T17:57:01.613765Z", "data_removed": false, "error": null, "id": "zlv6rxdbklwsymynw4teh7b4a4", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "A professional headshot of a business woman, studio quality, cinematic shot", "guidance_scale": 5, "negative_prompt": "older, eyes, crowfoot, crows feet, crows foot, old, wrinkles, (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, bad hands", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 }, "logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:19, 1.46it/s]\n 7%|▋ | 2/30 [00:01<00:19, 1.46it/s]\n 10%|█ | 3/30 [00:02<00:18, 1.46it/s]\n 13%|█▎ | 4/30 [00:02<00:17, 1.46it/s]\n 17%|█▋ | 5/30 [00:03<00:17, 1.46it/s]\n 20%|██ | 6/30 [00:04<00:16, 1.46it/s]\n 23%|██▎ | 7/30 [00:04<00:15, 1.46it/s]\n 27%|██▋ | 8/30 [00:05<00:15, 1.46it/s]\n 30%|███ | 9/30 [00:06<00:14, 1.46it/s]\n 33%|███▎ | 10/30 [00:06<00:13, 1.46it/s]\n 37%|███▋ | 11/30 [00:07<00:13, 1.46it/s]\n 40%|████ | 12/30 [00:08<00:12, 1.45it/s]\n 43%|████▎ | 13/30 [00:08<00:11, 1.45it/s]\n 47%|████▋ | 14/30 [00:09<00:11, 1.45it/s]\n 50%|█████ | 15/30 [00:10<00:10, 1.45it/s]\n 53%|█████▎ | 16/30 [00:10<00:09, 1.45it/s]\n 57%|█████▋ | 17/30 [00:11<00:08, 1.45it/s]\n 60%|██████ | 18/30 [00:12<00:08, 1.45it/s]\n 63%|██████▎ | 19/30 [00:13<00:07, 1.45it/s]\n 67%|██████▋ | 20/30 [00:13<00:06, 1.45it/s]\n 70%|███████ | 21/30 [00:14<00:06, 1.45it/s]\n 73%|███████▎ | 22/30 [00:15<00:05, 1.45it/s]\n 77%|███████▋ | 23/30 [00:15<00:04, 1.45it/s]\n 80%|████████ | 24/30 [00:16<00:04, 1.45it/s]\n 83%|████████▎ | 25/30 [00:17<00:03, 1.45it/s]\n 87%|████████▋ | 26/30 [00:17<00:02, 1.46it/s]\n 90%|█████████ | 27/30 [00:18<00:02, 1.45it/s]\n 93%|█████████▎| 28/30 [00:19<00:01, 1.45it/s]\n 97%|█████████▋| 29/30 [00:19<00:00, 1.45it/s]\n100%|██████████| 30/30 [00:20<00:00, 1.45it/s]\n100%|██████████| 30/30 [00:20<00:00, 1.46it/s]", "metrics": { "predict_time": 39.037616, "total_time": 55.731525 }, "output": "https://replicate.delivery/pbxt/GsUfeeppoRbdBIMYT2RWBt8D9kAwttgVFHl69m0UfVhSaAfRC/result.jpg", "started_at": "2024-01-24T17:57:18.307674Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/zlv6rxdbklwsymynw4teh7b4a4", "cancel": "https://api.replicate.com/v1/predictions/zlv6rxdbklwsymynw4teh7b4a4/cancel" }, "version": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279" }
Generated in0%| | 0/30 [00:00<?, ?it/s] 3%|▎ | 1/30 [00:00<00:19, 1.46it/s] 7%|▋ | 2/30 [00:01<00:19, 1.46it/s] 10%|█ | 3/30 [00:02<00:18, 1.46it/s] 13%|█▎ | 4/30 [00:02<00:17, 1.46it/s] 17%|█▋ | 5/30 [00:03<00:17, 1.46it/s] 20%|██ | 6/30 [00:04<00:16, 1.46it/s] 23%|██▎ | 7/30 [00:04<00:15, 1.46it/s] 27%|██▋ | 8/30 [00:05<00:15, 1.46it/s] 30%|███ | 9/30 [00:06<00:14, 1.46it/s] 33%|███▎ | 10/30 [00:06<00:13, 1.46it/s] 37%|███▋ | 11/30 [00:07<00:13, 1.46it/s] 40%|████ | 12/30 [00:08<00:12, 1.45it/s] 43%|████▎ | 13/30 [00:08<00:11, 1.45it/s] 47%|████▋ | 14/30 [00:09<00:11, 1.45it/s] 50%|█████ | 15/30 [00:10<00:10, 1.45it/s] 53%|█████▎ | 16/30 [00:10<00:09, 1.45it/s] 57%|█████▋ | 17/30 [00:11<00:08, 1.45it/s] 60%|██████ | 18/30 [00:12<00:08, 1.45it/s] 63%|██████▎ | 19/30 [00:13<00:07, 1.45it/s] 67%|██████▋ | 20/30 [00:13<00:06, 1.45it/s] 70%|███████ | 21/30 [00:14<00:06, 1.45it/s] 73%|███████▎ | 22/30 [00:15<00:05, 1.45it/s] 77%|███████▋ | 23/30 [00:15<00:04, 1.45it/s] 80%|████████ | 24/30 [00:16<00:04, 1.45it/s] 83%|████████▎ | 25/30 [00:17<00:03, 1.45it/s] 87%|████████▋ | 26/30 [00:17<00:02, 1.46it/s] 90%|█████████ | 27/30 [00:18<00:02, 1.45it/s] 93%|█████████▎| 28/30 [00:19<00:01, 1.45it/s] 97%|█████████▋| 29/30 [00:19<00:00, 1.45it/s] 100%|██████████| 30/30 [00:20<00:00, 1.45it/s] 100%|██████████| 30/30 [00:20<00:00, 1.46it/s]
Prediction
grandlineai/instant-id-photorealistic:03914a0cIDtz5z5vdbbosqudqbfuekbjvpnuStatusSucceededSourceWebHardwareA40Total durationCreatedInput
- width
- 640
- height
- 640
- prompt
- glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still
- guidance_scale
- 5
- ip_adapter_scale
- 0.8
- num_inference_steps
- 30
- controlnet_conditioning_scale
- 0.6
{ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still", "guidance_scale": 5, "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", { input: { image: "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", width: 640, height: 640, prompt: "glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still", guidance_scale: 5, ip_adapter_scale: 0.8, num_inference_steps: 30, controlnet_conditioning_scale: 0.6 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", input={ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still", "guidance_scale": 5, "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run grandlineai/instant-id-photorealistic 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": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still", "guidance_scale": 5, "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279 \ -i 'image="https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png"' \ -i 'width=640' \ -i 'height=640' \ -i 'prompt="glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still"' \ -i 'guidance_scale=5' \ -i 'ip_adapter_scale=0.8' \ -i 'num_inference_steps=30' \ -i 'controlnet_conditioning_scale=0.6'
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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still", "guidance_scale": 5, "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-01-24T18:05:06.485570Z", "created_at": "2024-01-24T18:04:31.488258Z", "data_removed": false, "error": null, "id": "tz5z5vdbbosqudqbfuekbjvpnu", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "glowing, robe, fog, mist, smoke, girl composed of white light, girl composed of black smoke, fire, sun, 1girl, long hair, solo, photorealistic, cowboy shot, cinematic angle, fisheye, motion blur, blue fire, rain, Long hair fluttering in the wind, long, wave, cinematic film still", "guidance_scale": 5, "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 }, "logs": "0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:19, 1.47it/s]\n 7%|▋ | 2/30 [00:01<00:19, 1.47it/s]\n 10%|█ | 3/30 [00:02<00:18, 1.46it/s]\n 13%|█▎ | 4/30 [00:02<00:17, 1.46it/s]\n 17%|█▋ | 5/30 [00:03<00:17, 1.46it/s]\n 20%|██ | 6/30 [00:04<00:16, 1.46it/s]\n 23%|██▎ | 7/30 [00:04<00:15, 1.46it/s]\n 27%|██▋ | 8/30 [00:05<00:15, 1.46it/s]\n 30%|███ | 9/30 [00:06<00:14, 1.46it/s]\n 33%|███▎ | 10/30 [00:06<00:13, 1.46it/s]\n 37%|███▋ | 11/30 [00:07<00:13, 1.46it/s]\n 40%|████ | 12/30 [00:08<00:12, 1.46it/s]\n 43%|████▎ | 13/30 [00:08<00:11, 1.46it/s]\n 47%|████▋ | 14/30 [00:09<00:10, 1.46it/s]\n 50%|█████ | 15/30 [00:10<00:10, 1.46it/s]\n 53%|█████▎ | 16/30 [00:10<00:09, 1.46it/s]\n 57%|█████▋ | 17/30 [00:11<00:08, 1.46it/s]\n 60%|██████ | 18/30 [00:12<00:08, 1.46it/s]\n 63%|██████▎ | 19/30 [00:13<00:07, 1.46it/s]\n 67%|██████▋ | 20/30 [00:13<00:06, 1.46it/s]\n 70%|███████ | 21/30 [00:14<00:06, 1.46it/s]\n 73%|███████▎ | 22/30 [00:15<00:05, 1.46it/s]\n 77%|███████▋ | 23/30 [00:15<00:04, 1.46it/s]\n 80%|████████ | 24/30 [00:16<00:04, 1.46it/s]\n 83%|████████▎ | 25/30 [00:17<00:03, 1.46it/s]\n 87%|████████▋ | 26/30 [00:17<00:02, 1.46it/s]\n 90%|█████████ | 27/30 [00:18<00:02, 1.46it/s]\n 93%|█████████▎| 28/30 [00:19<00:01, 1.46it/s]\n 97%|█████████▋| 29/30 [00:19<00:00, 1.46it/s]\n100%|██████████| 30/30 [00:20<00:00, 1.46it/s]\n100%|██████████| 30/30 [00:20<00:00, 1.46it/s]", "metrics": { "predict_time": 34.959287, "total_time": 34.997312 }, "output": "https://replicate.delivery/pbxt/3q7WGSzLHSYzORirZBeI44fno95RHckEQmsIspB6fiCjagfIB/result.jpg", "started_at": "2024-01-24T18:04:31.526283Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tz5z5vdbbosqudqbfuekbjvpnu", "cancel": "https://api.replicate.com/v1/predictions/tz5z5vdbbosqudqbfuekbjvpnu/cancel" }, "version": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279" }
Generated in0%| | 0/30 [00:00<?, ?it/s] 3%|▎ | 1/30 [00:00<00:19, 1.47it/s] 7%|▋ | 2/30 [00:01<00:19, 1.47it/s] 10%|█ | 3/30 [00:02<00:18, 1.46it/s] 13%|█▎ | 4/30 [00:02<00:17, 1.46it/s] 17%|█▋ | 5/30 [00:03<00:17, 1.46it/s] 20%|██ | 6/30 [00:04<00:16, 1.46it/s] 23%|██▎ | 7/30 [00:04<00:15, 1.46it/s] 27%|██▋ | 8/30 [00:05<00:15, 1.46it/s] 30%|███ | 9/30 [00:06<00:14, 1.46it/s] 33%|███▎ | 10/30 [00:06<00:13, 1.46it/s] 37%|███▋ | 11/30 [00:07<00:13, 1.46it/s] 40%|████ | 12/30 [00:08<00:12, 1.46it/s] 43%|████▎ | 13/30 [00:08<00:11, 1.46it/s] 47%|████▋ | 14/30 [00:09<00:10, 1.46it/s] 50%|█████ | 15/30 [00:10<00:10, 1.46it/s] 53%|█████▎ | 16/30 [00:10<00:09, 1.46it/s] 57%|█████▋ | 17/30 [00:11<00:08, 1.46it/s] 60%|██████ | 18/30 [00:12<00:08, 1.46it/s] 63%|██████▎ | 19/30 [00:13<00:07, 1.46it/s] 67%|██████▋ | 20/30 [00:13<00:06, 1.46it/s] 70%|███████ | 21/30 [00:14<00:06, 1.46it/s] 73%|███████▎ | 22/30 [00:15<00:05, 1.46it/s] 77%|███████▋ | 23/30 [00:15<00:04, 1.46it/s] 80%|████████ | 24/30 [00:16<00:04, 1.46it/s] 83%|████████▎ | 25/30 [00:17<00:03, 1.46it/s] 87%|████████▋ | 26/30 [00:17<00:02, 1.46it/s] 90%|█████████ | 27/30 [00:18<00:02, 1.46it/s] 93%|█████████▎| 28/30 [00:19<00:01, 1.46it/s] 97%|█████████▋| 29/30 [00:19<00:00, 1.46it/s] 100%|██████████| 30/30 [00:20<00:00, 1.46it/s] 100%|██████████| 30/30 [00:20<00:00, 1.46it/s]
Prediction
grandlineai/instant-id-photorealistic:03914a0cID3ctipytb73t4k63ybekbbfur4qStatusSucceededSourceWebHardwareA40Total durationCreatedInput
- width
- 640
- height
- 640
- prompt
- 80's anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic
- guidance_scale
- 5
- negative_prompt
- ip_adapter_scale
- 0.8
- num_inference_steps
- 30
- controlnet_conditioning_scale
- 0.6
{ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "80's anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic", "guidance_scale": 5, "negative_prompt": "", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", { input: { image: "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", width: 640, height: 640, prompt: "80's anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic", guidance_scale: 5, negative_prompt: "", ip_adapter_scale: 0.8, num_inference_steps: 30, controlnet_conditioning_scale: 0.6 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run grandlineai/instant-id-photorealistic using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "grandlineai/instant-id-photorealistic:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", input={ "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "80's anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic", "guidance_scale": 5, "negative_prompt": "", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run grandlineai/instant-id-photorealistic 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": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "80\'s anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic", "guidance_scale": 5, "negative_prompt": "", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279 \ -i 'image="https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png"' \ -i 'width=640' \ -i 'height=640' \ -i $'prompt="80\'s anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic"' \ -i 'guidance_scale=5' \ -i 'negative_prompt=""' \ -i 'ip_adapter_scale=0.8' \ -i 'num_inference_steps=30' \ -i 'controlnet_conditioning_scale=0.6'
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/grandlineai/instant-id-photorealistic@sha256:03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "80\'s anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic", "guidance_scale": 5, "negative_prompt": "", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-01-24T18:37:04.497717Z", "created_at": "2024-01-24T18:36:16.605497Z", "data_removed": false, "error": null, "id": "3ctipytb73t4k63ybekbbfur4q", "input": { "image": "https://replicate.delivery/pbxt/KHU47j4Ad3rbq6TVxRuwFhyyX6HYmWrCSlUuVOM3q3ORKgVt/demo.png", "width": 640, "height": 640, "prompt": "80's anime screencap, girl wearing a cropped top and short shorts, artistic rendition with wide brush strokes, anime comic", "guidance_scale": 5, "negative_prompt": "", "ip_adapter_scale": 0.8, "num_inference_steps": 30, "controlnet_conditioning_scale": 0.6 }, "logs": "/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\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:05<02:46, 5.74s/it]\n 7%|▋ | 2/30 [00:06<01:17, 2.77s/it]\n 10%|█ | 3/30 [00:07<00:49, 1.82s/it]\n 13%|█▎ | 4/30 [00:07<00:35, 1.37s/it]\n 17%|█▋ | 5/30 [00:08<00:28, 1.12s/it]\n 20%|██ | 6/30 [00:09<00:23, 1.03it/s]\n 23%|██▎ | 7/30 [00:09<00:20, 1.14it/s]\n 27%|██▋ | 8/30 [00:10<00:17, 1.22it/s]\n 30%|███ | 9/30 [00:11<00:16, 1.29it/s]\n 33%|███▎ | 10/30 [00:11<00:14, 1.34it/s]\n 37%|███▋ | 11/30 [00:12<00:13, 1.37it/s]\n 40%|████ | 12/30 [00:13<00:12, 1.40it/s]\n 43%|████▎ | 13/30 [00:13<00:11, 1.42it/s]\n 47%|████▋ | 14/30 [00:14<00:11, 1.43it/s]\n 50%|█████ | 15/30 [00:15<00:10, 1.44it/s]\n 53%|█████▎ | 16/30 [00:15<00:09, 1.45it/s]\n 57%|█████▋ | 17/30 [00:16<00:08, 1.45it/s]\n 60%|██████ | 18/30 [00:17<00:08, 1.45it/s]\n 63%|██████▎ | 19/30 [00:18<00:07, 1.46it/s]\n 67%|██████▋ | 20/30 [00:18<00:06, 1.46it/s]\n 70%|███████ | 21/30 [00:19<00:06, 1.46it/s]\n 73%|███████▎ | 22/30 [00:20<00:05, 1.46it/s]\n 77%|███████▋ | 23/30 [00:20<00:04, 1.46it/s]\n 80%|████████ | 24/30 [00:21<00:04, 1.46it/s]\n 83%|████████▎ | 25/30 [00:22<00:03, 1.46it/s]\n 87%|████████▋ | 26/30 [00:22<00:02, 1.46it/s]\n 90%|█████████ | 27/30 [00:23<00:02, 1.46it/s]\n 93%|█████████▎| 28/30 [00:24<00:01, 1.46it/s]\n 97%|█████████▋| 29/30 [00:24<00:00, 1.46it/s]\n100%|██████████| 30/30 [00:25<00:00, 1.46it/s]\n100%|██████████| 30/30 [00:25<00:00, 1.17it/s]", "metrics": { "predict_time": 47.769652, "total_time": 47.89222 }, "output": "https://replicate.delivery/pbxt/ZsZr7ip4fv1Qfk28HhGiX8X4JM9dxNUJrWbXiGwfjf4fZFejE/result.jpg", "started_at": "2024-01-24T18:36:16.728065Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/3ctipytb73t4k63ybekbbfur4q", "cancel": "https://api.replicate.com/v1/predictions/3ctipytb73t4k63ybekbbfur4q/cancel" }, "version": "03914a0c3326bf44383d0cd84b06822618af879229ce5d1d53bef38d93b68279" }
Generated in/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 0%| | 0/30 [00:00<?, ?it/s] 3%|▎ | 1/30 [00:05<02:46, 5.74s/it] 7%|▋ | 2/30 [00:06<01:17, 2.77s/it] 10%|█ | 3/30 [00:07<00:49, 1.82s/it] 13%|█▎ | 4/30 [00:07<00:35, 1.37s/it] 17%|█▋ | 5/30 [00:08<00:28, 1.12s/it] 20%|██ | 6/30 [00:09<00:23, 1.03it/s] 23%|██▎ | 7/30 [00:09<00:20, 1.14it/s] 27%|██▋ | 8/30 [00:10<00:17, 1.22it/s] 30%|███ | 9/30 [00:11<00:16, 1.29it/s] 33%|███▎ | 10/30 [00:11<00:14, 1.34it/s] 37%|███▋ | 11/30 [00:12<00:13, 1.37it/s] 40%|████ | 12/30 [00:13<00:12, 1.40it/s] 43%|████▎ | 13/30 [00:13<00:11, 1.42it/s] 47%|████▋ | 14/30 [00:14<00:11, 1.43it/s] 50%|█████ | 15/30 [00:15<00:10, 1.44it/s] 53%|█████▎ | 16/30 [00:15<00:09, 1.45it/s] 57%|█████▋ | 17/30 [00:16<00:08, 1.45it/s] 60%|██████ | 18/30 [00:17<00:08, 1.45it/s] 63%|██████▎ | 19/30 [00:18<00:07, 1.46it/s] 67%|██████▋ | 20/30 [00:18<00:06, 1.46it/s] 70%|███████ | 21/30 [00:19<00:06, 1.46it/s] 73%|███████▎ | 22/30 [00:20<00:05, 1.46it/s] 77%|███████▋ | 23/30 [00:20<00:04, 1.46it/s] 80%|████████ | 24/30 [00:21<00:04, 1.46it/s] 83%|████████▎ | 25/30 [00:22<00:03, 1.46it/s] 87%|████████▋ | 26/30 [00:22<00:02, 1.46it/s] 90%|█████████ | 27/30 [00:23<00:02, 1.46it/s] 93%|█████████▎| 28/30 [00:24<00:01, 1.46it/s] 97%|█████████▋| 29/30 [00:24<00:00, 1.46it/s] 100%|██████████| 30/30 [00:25<00:00, 1.46it/s] 100%|██████████| 30/30 [00:25<00:00, 1.17it/s]
Want to make some of these yourself?
Run this model