typefile
{
"adapter_strength_ratio": 0.8,
"canny": false,
"canny_strength": 0.5,
"depth_map": false,
"depth_strength": 0.5,
"enable_fast_mode": true,
"enhance_non_face_region": true,
"face_image_path": "https://replicate.delivery/pbxt/KRsl57SjTUo1WOBw1ir3UVI06jpQ7ybyEtdprpqF2qja40Wn/halle-berry.jpeg",
"guidance_scale": 7,
"identitynet_strength_ratio": 0.8,
"lightning_steps": "4step",
"model": "AlbedoBase XL V2",
"negative_prompt": "ugly, low quality, deformed face, nsfw",
"num_steps": 25,
"pose": false,
"pose_strength": 0.5,
"prompt": "woman as elven princess, with blue sheen dress, masterpiece",
"safety_checker": true,
"scheduler": "DPMSolverMultistepScheduler",
"seed": 0
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_SOb**********************************
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 tgohblio/instant-id-multicontrolnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"tgohblio/instant-id-multicontrolnet:35324a7df2397e6e57dfd8f4f9d2910425f5123109c8c3ed035e769aeff9ff3c",
{
input: {
adapter_strength_ratio: 0.8,
canny: false,
canny_strength: 0.5,
depth_map: false,
depth_strength: 0.5,
enable_fast_mode: true,
enhance_non_face_region: true,
face_image_path: "https://replicate.delivery/pbxt/KRsl57SjTUo1WOBw1ir3UVI06jpQ7ybyEtdprpqF2qja40Wn/halle-berry.jpeg",
guidance_scale: 7,
identitynet_strength_ratio: 0.8,
lightning_steps: "4step",
model: "AlbedoBase XL V2",
negative_prompt: "ugly, low quality, deformed face, nsfw",
num_steps: 25,
pose: false,
pose_strength: 0.5,
prompt: "woman as elven princess, with blue sheen dress, masterpiece",
safety_checker: true,
scheduler: "DPMSolverMultistepScheduler",
seed: 0
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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=r8_SOb**********************************
This is your API token. Keep it to yourself.
import replicate
Run tgohblio/instant-id-multicontrolnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"tgohblio/instant-id-multicontrolnet:35324a7df2397e6e57dfd8f4f9d2910425f5123109c8c3ed035e769aeff9ff3c",
input={
"adapter_strength_ratio": 0.8,
"canny": False,
"canny_strength": 0.5,
"depth_map": False,
"depth_strength": 0.5,
"enable_fast_mode": True,
"enhance_non_face_region": True,
"face_image_path": "https://replicate.delivery/pbxt/KRsl57SjTUo1WOBw1ir3UVI06jpQ7ybyEtdprpqF2qja40Wn/halle-berry.jpeg",
"guidance_scale": 7,
"identitynet_strength_ratio": 0.8,
"lightning_steps": "4step",
"model": "AlbedoBase XL V2",
"negative_prompt": "ugly, low quality, deformed face, nsfw",
"num_steps": 25,
"pose": False,
"pose_strength": 0.5,
"prompt": "woman as elven princess, with blue sheen dress, masterpiece",
"safety_checker": True,
"scheduler": "DPMSolverMultistepScheduler",
"seed": 0
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.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_SOb**********************************
This is your API token. Keep it to yourself.
Run tgohblio/instant-id-multicontrolnet 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": "tgohblio/instant-id-multicontrolnet:35324a7df2397e6e57dfd8f4f9d2910425f5123109c8c3ed035e769aeff9ff3c",
"input": {
"adapter_strength_ratio": 0.8,
"canny": false,
"canny_strength": 0.5,
"depth_map": false,
"depth_strength": 0.5,
"enable_fast_mode": true,
"enhance_non_face_region": true,
"face_image_path": "https://replicate.delivery/pbxt/KRsl57SjTUo1WOBw1ir3UVI06jpQ7ybyEtdprpqF2qja40Wn/halle-berry.jpeg",
"guidance_scale": 7,
"identitynet_strength_ratio": 0.8,
"lightning_steps": "4step",
"model": "AlbedoBase XL V2",
"negative_prompt": "ugly, low quality, deformed face, nsfw",
"num_steps": 25,
"pose": false,
"pose_strength": 0.5,
"prompt": "woman as elven princess, with blue sheen dress, masterpiece",
"safety_checker": true,
"scheduler": "DPMSolverMultistepScheduler",
"seed": 0
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "q5ypk1g4yhrgg0cf90wskpb96r",
"model": "tgohblio/instant-id-multicontrolnet",
"version": "35324a7df2397e6e57dfd8f4f9d2910425f5123109c8c3ed035e769aeff9ff3c",
"input": {
"adapter_strength_ratio": 0.8,
"canny": false,
"canny_strength": 0.5,
"depth_map": false,
"depth_strength": 0.5,
"enable_fast_mode": true,
"enhance_non_face_region": true,
"face_image_path": "https://replicate.delivery/pbxt/KRsl57SjTUo1WOBw1ir3UVI06jpQ7ybyEtdprpqF2qja40Wn/halle-berry.jpeg",
"guidance_scale": 7,
"identitynet_strength_ratio": 0.8,
"lightning_steps": "4step",
"model": "AlbedoBase XL V2",
"negative_prompt": "ugly, low quality, deformed face, nsfw",
"num_steps": 25,
"pose": false,
"pose_strength": 0.5,
"prompt": "woman as elven princess, with blue sheen dress, masterpiece",
"safety_checker": true,
"scheduler": "DPMSolverMultistepScheduler",
"seed": 0
},
"logs": "/root/.pyenv/versions/3.11.9/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/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:02, 1.36it/s]\n 50%|█████ | 2/4 [00:00<00:00, 2.32it/s]\n 75%|███████▌ | 3/4 [00:01<00:00, 2.99it/s]\n100%|██████████| 4/4 [00:01<00:00, 3.45it/s]\n100%|██████████| 4/4 [00:01<00:00, 2.87it/s]",
"output": "https://replicate.delivery/pbxt/ykhrJWQyyEqEDZQsySpruv5fRKgFaDtjT35GgL5JEYDNkoYJA/result.jpg",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-05-05T10:07:27.476Z",
"started_at": "2024-05-05T10:31:45.264778Z",
"completed_at": "2024-05-05T10:31:55.025763Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/q5ypk1g4yhrgg0cf90wskpb96r/cancel",
"get": "https://api.replicate.com/v1/predictions/q5ypk1g4yhrgg0cf90wskpb96r",
"web": "https://replicate.com/p/q5ypk1g4yhrgg0cf90wskpb96r"
},
"metrics": {
"predict_time": 9.760985,
"total_time": 1467.549763
}
}
