typetext
{
"control_type": "Ghibli",
"control_weight": 1.2,
"extra_control_type": "pose",
"extra_control_weight": 0.65,
"extra_spatial_img": "https://replicate.delivery/pbxt/MyLRSx6uGs94l0zLLAvnIenJwPbj2iFC95oKLbQce4XfAYQd/ComfyUI_00070_.jpg",
"height": 0,
"output_format": "png",
"output_quality": 90,
"prompt": "Ghibli Studio style, Charming hand-drawn anime-style illustration",
"seed": 42,
"spatial_img": "https://replicate.delivery/pbxt/MyLRTYOlEZDnYTq6QTLWQOkNhEo6HJf22SvMtiNPtRndo390/boy.png",
"use_zero_init": true,
"width": 0,
"zero_steps": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Qtj**********************************
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 zhangp365/flux_loras using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zhangp365/flux_loras:040a409de8e9358addafd8346559501454ecf3af9fae9a6c695482273d9f292b",
{
input: {
control_type: "Ghibli",
control_weight: 1.2,
extra_control_type: "pose",
extra_control_weight: 0.65,
extra_spatial_img: "https://replicate.delivery/pbxt/MyLRSx6uGs94l0zLLAvnIenJwPbj2iFC95oKLbQce4XfAYQd/ComfyUI_00070_.jpg",
height: 0,
output_format: "png",
output_quality: 90,
prompt: "Ghibli Studio style, Charming hand-drawn anime-style illustration",
seed: 42,
spatial_img: "https://replicate.delivery/pbxt/MyLRTYOlEZDnYTq6QTLWQOkNhEo6HJf22SvMtiNPtRndo390/boy.png",
use_zero_init: true,
width: 0,
zero_steps: 1
}
}
);
// 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_Qtj**********************************
This is your API token. Keep it to yourself.
import replicate
Run zhangp365/flux_loras using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zhangp365/flux_loras:040a409de8e9358addafd8346559501454ecf3af9fae9a6c695482273d9f292b",
input={
"control_type": "Ghibli",
"control_weight": 1.2,
"extra_control_type": "pose",
"extra_control_weight": 0.65,
"extra_spatial_img": "https://replicate.delivery/pbxt/MyLRSx6uGs94l0zLLAvnIenJwPbj2iFC95oKLbQce4XfAYQd/ComfyUI_00070_.jpg",
"height": 0,
"output_format": "png",
"output_quality": 90,
"prompt": "Ghibli Studio style, Charming hand-drawn anime-style illustration",
"seed": 42,
"spatial_img": "https://replicate.delivery/pbxt/MyLRTYOlEZDnYTq6QTLWQOkNhEo6HJf22SvMtiNPtRndo390/boy.png",
"use_zero_init": True,
"width": 0,
"zero_steps": 1
}
)
# 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_Qtj**********************************
This is your API token. Keep it to yourself.
Run zhangp365/flux_loras 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": "zhangp365/flux_loras:040a409de8e9358addafd8346559501454ecf3af9fae9a6c695482273d9f292b",
"input": {
"control_type": "Ghibli",
"control_weight": 1.2,
"extra_control_type": "pose",
"extra_control_weight": 0.65,
"extra_spatial_img": "https://replicate.delivery/pbxt/MyLRSx6uGs94l0zLLAvnIenJwPbj2iFC95oKLbQce4XfAYQd/ComfyUI_00070_.jpg",
"height": 0,
"output_format": "png",
"output_quality": 90,
"prompt": "Ghibli Studio style, Charming hand-drawn anime-style illustration",
"seed": 42,
"spatial_img": "https://replicate.delivery/pbxt/MyLRTYOlEZDnYTq6QTLWQOkNhEo6HJf22SvMtiNPtRndo390/boy.png",
"use_zero_init": true,
"width": 0,
"zero_steps": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "5gp0atm0ynrj40cppga8js7r3r",
"model": "zhangp365/flux_loras",
"version": "040a409de8e9358addafd8346559501454ecf3af9fae9a6c695482273d9f292b",
"input": {
"control_type": "Ghibli",
"control_weight": 1.2,
"extra_control_type": "pose",
"extra_control_weight": 0.65,
"extra_spatial_img": "https://replicate.delivery/pbxt/MyLRSx6uGs94l0zLLAvnIenJwPbj2iFC95oKLbQce4XfAYQd/ComfyUI_00070_.jpg",
"height": 0,
"output_format": "png",
"output_quality": 90,
"prompt": "Ghibli Studio style, Charming hand-drawn anime-style illustration",
"seed": 42,
"spatial_img": "https://replicate.delivery/pbxt/MyLRTYOlEZDnYTq6QTLWQOkNhEo6HJf22SvMtiNPtRndo390/boy.png",
"use_zero_init": true,
"width": 0,
"zero_steps": 1
},
"logs": "Loading .safetensors checkpoint from ./checkpoints/models/models/Ghibli.safetensors\nLoading .safetensors checkpoint from ./checkpoints/models/models/pose.safetensors\n2025-05-09 08:08:50,533 - INFO - 219 - Multi LoRA applied successfully.\n2025-05-09 08:08:50,533 - INFO - 231 - Using seed: 42\n2025-05-09 08:08:50,591 - INFO - 247 - Loaded spatial image from: /tmp/tmp5l5tmrj4boy.png\n2025-05-09 08:08:50,594 - INFO - 247 - Loaded spatial image from: /tmp/tmpd1yp3vstComfyUI_00070_.jpg\n2025-05-09 08:08:50,594 - INFO - 266 - Generating image with use_zero_init=True...\n<PIL.Image.Image image mode=RGB size=1024x1536 at 0x7BF00CAB5010>\n<PIL.Image.Image image mode=RGB size=512x768 at 0x7BEFE69FC890>\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|▍ | 1/25 [00:01<00:25, 1.07s/it]\n 8%|▊ | 2/25 [00:01<00:20, 1.12it/s]\n 12%|█▏ | 3/25 [00:02<00:21, 1.05it/s]\n 16%|█▌ | 4/25 [00:03<00:20, 1.01it/s]\n 20%|██ | 5/25 [00:04<00:20, 1.00s/it]\n 24%|██▍ | 6/25 [00:05<00:19, 1.01s/it]\n 28%|██▊ | 7/25 [00:07<00:18, 1.02s/it]\n 32%|███▏ | 8/25 [00:08<00:17, 1.03s/it]\n 36%|███▌ | 9/25 [00:09<00:16, 1.03s/it]\n 40%|████ | 10/25 [00:10<00:15, 1.03s/it]\n 44%|████▍ | 11/25 [00:11<00:14, 1.03s/it]\n 48%|████▊ | 12/25 [00:12<00:13, 1.03s/it]\n 52%|█████▏ | 13/25 [00:13<00:12, 1.03s/it]\n 56%|█████▌ | 14/25 [00:14<00:11, 1.04s/it]\n 60%|██████ | 15/25 [00:15<00:10, 1.04s/it]\n 64%|██████▍ | 16/25 [00:16<00:09, 1.04s/it]\n 68%|██████▊ | 17/25 [00:17<00:08, 1.04s/it]\n 72%|███████▏ | 18/25 [00:18<00:07, 1.04s/it]\n 76%|███████▌ | 19/25 [00:19<00:06, 1.04s/it]\n 80%|████████ | 20/25 [00:20<00:05, 1.04s/it]\n 84%|████████▍ | 21/25 [00:21<00:04, 1.04s/it]\n 88%|████████▊ | 22/25 [00:22<00:03, 1.04s/it]\n 92%|█████████▏| 23/25 [00:23<00:02, 1.04s/it]\n 96%|█████████▌| 24/25 [00:24<00:01, 1.04s/it]\n100%|██████████| 25/25 [00:25<00:00, 1.04s/it]\n100%|██████████| 25/25 [00:25<00:00, 1.03s/it]\n2025-05-09 08:09:18,407 - INFO - 283 - Generated 'zeroinit' image in 27.81s\n2025-05-09 08:09:18,988 - INFO - 330 - Saved: output_seed42.png\n2025-05-09 08:09:18,988 - INFO - 331 - Saved output in 0.57s\n2025-05-09 08:09:18,988 - INFO - 340 - Total prediction time: 28.89 seconds",
"output": [
"https://replicate.delivery/yhqm/EDPo8wmfhIzBBqkHMeaoxdpvTym7VsecAioeknQfXnezLqtKF/output_seed42.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-09T08:06:04.789Z",
"started_at": "2025-05-09T08:08:49.761463Z",
"completed_at": "2025-05-09T08:09:19.009473Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5gp0atm0ynrj40cppga8js7r3r/cancel",
"get": "https://api.replicate.com/v1/predictions/5gp0atm0ynrj40cppga8js7r3r",
"stream": "https://stream.replicate.com/v1/files/qoxq-pzjrp5w36jqfqziclbjtccfylgfaz7wgqmbpbyuiazdjsmro3tnq",
"web": "https://replicate.com/p/5gp0atm0ynrj40cppga8js7r3r"
},
"metrics": {
"predict_time": 29.248009889,
"total_time": 194.220473
}
}

