typetext
{
"cfg": 4,
"height": 1024,
"image": "https://replicate.delivery/pbxt/LI5VAhU2v3jNTjuE76GMTzikT1XMiUoRSznZdXR0cAnK1XJS/ComfyUI_00362_.png",
"ip_adapter_weight": 1,
"ip_adapter_weight_type": "style transfer precise",
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "an illustration of a cute dog jumping over a sleeping cat",
"sampler": "dpmpp_2m_sde_gpu",
"scheduler": "karras",
"steps": 25,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_F8f**********************************
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 fofr/kolors-with-ipadapter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/kolors-with-ipadapter:5a1a92b2c0f81813225d48ed8e411813da41aa84e7582fb705d1af46eea36eed",
{
input: {
cfg: 4,
height: 1024,
image: "https://replicate.delivery/pbxt/LI5VAhU2v3jNTjuE76GMTzikT1XMiUoRSznZdXR0cAnK1XJS/ComfyUI_00362_.png",
ip_adapter_weight: 1,
ip_adapter_weight_type: "style transfer precise",
negative_prompt: "",
number_of_images: 1,
output_format: "webp",
output_quality: 80,
prompt: "an illustration of a cute dog jumping over a sleeping cat",
sampler: "dpmpp_2m_sde_gpu",
scheduler: "karras",
steps: 25,
width: 1024
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_F8f**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/kolors-with-ipadapter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/kolors-with-ipadapter:5a1a92b2c0f81813225d48ed8e411813da41aa84e7582fb705d1af46eea36eed",
input={
"cfg": 4,
"height": 1024,
"image": "https://replicate.delivery/pbxt/LI5VAhU2v3jNTjuE76GMTzikT1XMiUoRSznZdXR0cAnK1XJS/ComfyUI_00362_.png",
"ip_adapter_weight": 1,
"ip_adapter_weight_type": "style transfer precise",
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "an illustration of a cute dog jumping over a sleeping cat",
"sampler": "dpmpp_2m_sde_gpu",
"scheduler": "karras",
"steps": 25,
"width": 1024
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_F8f**********************************
This is your API token. Keep it to yourself.
Run fofr/kolors-with-ipadapter 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": "fofr/kolors-with-ipadapter:5a1a92b2c0f81813225d48ed8e411813da41aa84e7582fb705d1af46eea36eed",
"input": {
"cfg": 4,
"height": 1024,
"image": "https://replicate.delivery/pbxt/LI5VAhU2v3jNTjuE76GMTzikT1XMiUoRSznZdXR0cAnK1XJS/ComfyUI_00362_.png",
"ip_adapter_weight": 1,
"ip_adapter_weight_type": "style transfer precise",
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "an illustration of a cute dog jumping over a sleeping cat",
"sampler": "dpmpp_2m_sde_gpu",
"scheduler": "karras",
"steps": 25,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "3eqtsdhv35rgm0cgrvd8yr1y7c",
"model": "fofr/kolors-with-ipadapter",
"version": "5a1a92b2c0f81813225d48ed8e411813da41aa84e7582fb705d1af46eea36eed",
"input": {
"cfg": 4,
"height": 1024,
"image": "https://replicate.delivery/pbxt/LI5VAhU2v3jNTjuE76GMTzikT1XMiUoRSznZdXR0cAnK1XJS/ComfyUI_00362_.png",
"ip_adapter_weight": 1,
"ip_adapter_weight_type": "style transfer precise",
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "an illustration of a cute dog jumping over a sleeping cat",
"sampler": "dpmpp_2m_sde_gpu",
"scheduler": "karras",
"steps": 25,
"width": 1024
},
"logs": "Random seed set to: 1134600525\nRunning workflow\ngot prompt\nExecuting node 67, title: MinusZone - ChatGLM3TextEncode, class type: MZ_ChatGLM3\nExecuting node 79, title: KSampler, class type: KSampler\nRequested to load SDXL\nLoading 1 new model\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|▍ | 1/25 [00:00<00:04, 4.94it/s]\n 8%|▊ | 2/25 [00:00<00:04, 4.90it/s]\n 12%|█▏ | 3/25 [00:00<00:04, 4.89it/s]\n 16%|█▌ | 4/25 [00:00<00:04, 4.89it/s]\n 20%|██ | 5/25 [00:01<00:04, 4.90it/s]\n 24%|██▍ | 6/25 [00:01<00:03, 4.89it/s]\n 28%|██▊ | 7/25 [00:01<00:03, 4.89it/s]\n 32%|███▏ | 8/25 [00:01<00:03, 4.89it/s]\n 36%|███▌ | 9/25 [00:01<00:03, 4.89it/s]\n 40%|████ | 10/25 [00:02<00:03, 4.86it/s]\n 44%|████▍ | 11/25 [00:02<00:02, 4.86it/s]\n 48%|████▊ | 12/25 [00:02<00:02, 4.87it/s]\n 52%|█████▏ | 13/25 [00:02<00:02, 4.88it/s]\n 56%|█████▌ | 14/25 [00:02<00:02, 4.88it/s]\n 60%|██████ | 15/25 [00:03<00:02, 4.89it/s]\n 64%|██████▍ | 16/25 [00:03<00:01, 4.89it/s]\n 68%|██████▊ | 17/25 [00:03<00:01, 4.90it/s]\n 72%|███████▏ | 18/25 [00:03<00:01, 4.90it/s]\n 76%|███████▌ | 19/25 [00:03<00:01, 4.90it/s]\n 80%|████████ | 20/25 [00:04<00:01, 4.90it/s]\n 84%|████████▍ | 21/25 [00:04<00:00, 4.89it/s]\n 88%|████████▊ | 22/25 [00:04<00:00, 4.90it/s]\n 92%|█████████▏| 23/25 [00:04<00:00, 4.90it/s]\n 96%|█████████▌| 24/25 [00:04<00:00, 4.92it/s]\n100%|██████████| 25/25 [00:05<00:00, 4.94it/s]\n100%|██████████| 25/25 [00:05<00:00, 4.90it/s]\nRequested to load AutoencoderKL\nLoading 1 new model\nExecuting node 80, title: VAE Decode, class type: VAEDecode\nExecuting node 89, title: Save Image, class type: SaveImage\nPrompt executed in 5.91 seconds\noutputs: {'89': {'images': [{'filename': 'ComfyUI_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nComfyUI_00001_.png",
"output": [
"https://replicate.delivery/pbxt/6afB4UMVrtXOCCUwnEN3pGvVx0OqPTr4A1656w6SSUL2A4kJA/ComfyUI_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-07-18T17:18:29.145Z",
"started_at": "2024-07-18T17:18:29.240731Z",
"completed_at": "2024-07-18T17:18:37.129145Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/3eqtsdhv35rgm0cgrvd8yr1y7c/cancel",
"get": "https://api.replicate.com/v1/predictions/3eqtsdhv35rgm0cgrvd8yr1y7c",
"web": "https://replicate.com/p/3eqtsdhv35rgm0cgrvd8yr1y7c"
},
"metrics": {
"predict_time": 7.888414131,
"total_time": 7.984145
}
}
