typefile
{
"cloth_image": "https://replicate.delivery/pbxt/MjVInxdHWaHcHcbQcmiEyf7vm9gMwo59uItGH3vYAaK1G1ir/example_jacket.png",
"cloth_type": "upper",
"output_format": "png",
"output_quality": 100,
"person_image": "https://replicate.delivery/pbxt/MjVIo8ENgFG5SBbMep5WKSJFakH3AxBX9YDzROldiNVK53VK/model%201.jpg"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1xp**********************************
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 cedoysch/flux-fill-redux-try-on using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cedoysch/flux-fill-redux-try-on:cf5cb07a25e726fe2fac166a8c5ab52ddccd48657741670fb09d9954d4d8446f",
{
input: {
cloth_image: "https://replicate.delivery/pbxt/MjVInxdHWaHcHcbQcmiEyf7vm9gMwo59uItGH3vYAaK1G1ir/example_jacket.png",
cloth_type: "upper",
output_format: "png",
output_quality: 100,
person_image: "https://replicate.delivery/pbxt/MjVIo8ENgFG5SBbMep5WKSJFakH3AxBX9YDzROldiNVK53VK/model%201.jpg"
}
}
);
// 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_1xp**********************************
This is your API token. Keep it to yourself.
import replicate
Run cedoysch/flux-fill-redux-try-on using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cedoysch/flux-fill-redux-try-on:cf5cb07a25e726fe2fac166a8c5ab52ddccd48657741670fb09d9954d4d8446f",
input={
"cloth_image": "https://replicate.delivery/pbxt/MjVInxdHWaHcHcbQcmiEyf7vm9gMwo59uItGH3vYAaK1G1ir/example_jacket.png",
"cloth_type": "upper",
"output_format": "png",
"output_quality": 100,
"person_image": "https://replicate.delivery/pbxt/MjVIo8ENgFG5SBbMep5WKSJFakH3AxBX9YDzROldiNVK53VK/model%201.jpg"
}
)
# 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_1xp**********************************
This is your API token. Keep it to yourself.
Run cedoysch/flux-fill-redux-try-on 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": "cedoysch/flux-fill-redux-try-on:cf5cb07a25e726fe2fac166a8c5ab52ddccd48657741670fb09d9954d4d8446f",
"input": {
"cloth_image": "https://replicate.delivery/pbxt/MjVInxdHWaHcHcbQcmiEyf7vm9gMwo59uItGH3vYAaK1G1ir/example_jacket.png",
"cloth_type": "upper",
"output_format": "png",
"output_quality": 100,
"person_image": "https://replicate.delivery/pbxt/MjVIo8ENgFG5SBbMep5WKSJFakH3AxBX9YDzROldiNVK53VK/model%201.jpg"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "p2set2eb8srme0cnv0hbbxxkcm",
"model": "cedoysch/flux-fill-redux-try-on",
"version": "cf5cb07a25e726fe2fac166a8c5ab52ddccd48657741670fb09d9954d4d8446f",
"input": {
"cloth_image": "https://replicate.delivery/pbxt/MjVInxdHWaHcHcbQcmiEyf7vm9gMwo59uItGH3vYAaK1G1ir/example_jacket.png",
"cloth_type": "upper",
"output_format": "png",
"output_quality": 100,
"person_image": "https://replicate.delivery/pbxt/MjVIo8ENgFG5SBbMep5WKSJFakH3AxBX9YDzROldiNVK53VK/model%201.jpg"
},
"logs": "Random seed set to: 2376496366\nChecking inputs\n✅ /tmp/inputs/person_image.jpg\n✅ /tmp/inputs/cloth_image.png\n====================================\nChecking weights\n✅ t5xxl_fp16.safetensors exists in ComfyUI/models/text_encoders\n✅ flux1-redux-dev.safetensors exists in ComfyUI/models/style_models\n✅ ViT-L-14-TEXT-detail-improved-hiT-GmP-HF.safetensors exists in ComfyUI/models/text_encoders\n✅ ae.safetensors exists in ComfyUI/models/vae\n✅ flux1-fill-dev.safetensors exists in ComfyUI/models/diffusion_models\n⚠️ RMBG-1.4/model.pth is for non-commercial use only. Unless you have obtained a commercial license.\nDetails: https://github.com/replicate/cog-comfyui/blob/main/weights_licenses.md\n✅ RMBG-1.4/model.pth exists in ComfyUI/custom_nodes/ComfyUI-BRIA_AI-RMBG/\n✅ sigclip_vision_patch14_384.safetensors exists in ComfyUI/models/clip_vision\n====================================\nRunning workflow\n[ComfyUI] got prompt\nExecuting node 17, title: Person, class type: LoadImage\nExecuting node 399, title: Resize Image, class type: ImageResizeKJ\nExecuting node 369, title: Auto Mask Generation, class type: AutoMasker\nExecuting node 371, title: Masked Target, class type: PreviewImage\nExecuting node 370, title: Binary Mask, class type: PreviewImage\nExecuting node 231, title: Scale Image to Total Pixels, class type: ImageScaleToTotalPixels\nExecuting node 235, title: ImageSize, class type: easy imageSize\nExecuting node 264, title: Image Concatenate, class type: ImageConcanate\nExecuting node 267, title: Preview Image, class type: PreviewImage\nExecuting node 184, title: ImageSize, class type: easy imageSize\nExecuting node 354, title: Image Concatenate, class type: ImageConcanate\nExecuting node 358, title: Convert Image to Mask, class type: ImageToMask\nExecuting node 397, title: 🔧 Mask Blur, class type: MaskBlur+\nExecuting node 259, title: InpaintModelConditioning, class type: InpaintModelConditioning\nExecuting node 263, title: KSampler, class type: KSampler\n[ComfyUI]\n[ComfyUI] 0%| | 0/12 [00:00<?, ?it/s]\n[ComfyUI] 8%|▊ | 1/12 [00:01<00:12, 1.16s/it]\n[ComfyUI] 17%|█▋ | 2/12 [00:03<00:16, 1.61s/it]\n[ComfyUI] 25%|██▌ | 3/12 [00:05<00:15, 1.76s/it]\n[ComfyUI] 33%|███▎ | 4/12 [00:06<00:14, 1.83s/it]\n[ComfyUI] 42%|████▏ | 5/12 [00:08<00:13, 1.86s/it]\n[ComfyUI] 50%|█████ | 6/12 [00:10<00:11, 1.89s/it]\n[ComfyUI] 58%|█████▊ | 7/12 [00:12<00:09, 1.90s/it]\n[ComfyUI] 67%|██████▋ | 8/12 [00:14<00:07, 1.91s/it]\n[ComfyUI] 75%|███████▌ | 9/12 [00:16<00:05, 1.92s/it]\n[ComfyUI] 83%|████████▎ | 10/12 [00:18<00:03, 1.93s/it]\n[ComfyUI] 92%|█████████▏| 11/12 [00:20<00:01, 1.93s/it]\n[ComfyUI] 100%|██████████| 12/12 [00:22<00:00, 1.93s/it]\nExecuting node 262, title: VAE Decode, class type: VAEDecode\nExecuting node 272, title: Preview Image, class type: PreviewImage\nExecuting node 191, title: Image Overlay, class type: Image Overlay\nExecuting node 273, title: Preview Image, class type: PreviewImage\nExecuting node 237, title: ImageSize, class type: easy imageSize\nExecuting node 238, title: 🔧 Simple Math, class type: SimpleMath+\nExecuting node 234, title: 🔧 Image Crop, class type: ImageCrop+\nExecuting node 333, title: Image Comparer (rgthree), class type: Image Comparer (rgthree)\nExecuting node 307, title: Save Image, class type: SaveImage\n[ComfyUI] 100%|██████████| 12/12 [00:22<00:00, 1.87s/it]\n[ComfyUI] Prompt executed in 26.56 seconds\noutputs: {'267': {'images': [{'filename': 'ComfyUI_temp_cbdba_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '307': {'images': [{'filename': 'ComfyUI_00001_.png', 'subfolder': '', 'type': 'output'}]}, '140': {'text': ['W', 'i', 'd', 't', 'h', ':', ' ', '1', '0', '2', '4', ' ', ',', ' ', 'H', 'e', 'i', 'g', 'h', 't', ':', ' ', '1', '0', '2', '4']}, '144': {'images': [{'filename': 'ComfyUI_temp_mpsux_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '272': {'images': [{'filename': 'ComfyUI_temp_psdlx_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '266': {'images': [{'filename': 'ComfyUI_temp_hjmip_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '236': {'text': ['W', 'i', 'd', 't', 'h', ':', ' ', '1', '3', '3', '5', ' ', ',', ' ', 'H', 'e', 'i', 'g', 'h', 't', ':', ' ', '1', '3', '3', '5']}, '371': {'images': [{'filename': 'ComfyUI_temp_eaecq_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '237': {'text': ['W', 'i', 'd', 't', 'h', ':', ' ', '2', '3', '2', '8', ' ', ',', ' ', 'H', 'e', 'i', 'g', 'h', 't', ':', ' ', '1', '3', '2', '8']}, '273': {'images': [{'filename': 'ComfyUI_temp_zgyrd_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '271': {'images': [{'filename': 'ComfyUI_temp_dkmud_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '391': {'text': ['A brown jacket with a fur collar on a white background.']}, '333': {'a_images': [{'filename': 'rgthree.compare._temp_updpu_00001_.png', 'subfolder': '', 'type': 'temp'}], 'b_images': [{'filename': 'rgthree.compare._temp_updpu_00002_.png', 'subfolder': '', 'type': 'temp'}]}, '370': {'images': [{'filename': 'ComfyUI_temp_iqrbr_00001_.png', 'subfolder': '', 'type': 'temp'}]}, '235': {'text': ['W', 'i', 'd', 't', 'h', ':', ' ', '1', '1', '5', '6', ' ', ',', ' ', 'H', 'e', 'i', 'g', 'h', 't', ':', ' ', '1', '5', '4', '2']}, '184': {'text': ['W', 'i', 'd', 't', 'h', ':', ' ', '2', '3', '3', '5', ' ', ',', ' ', 'H', 'e', 'i', 'g', 'h', 't', ':', ' ', '1', '3', '3', '5']}}\n====================================\nComfyUI_00001_.png",
"output": [
"https://replicate.delivery/xezq/3QaH2HRr6yZ7ApQaxtFB8TTSwgcabuxneXnk0nEF9rae2xcUA/ComfyUI_00001_.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-27T15:05:13.798Z",
"started_at": "2025-03-27T15:15:45.515841Z",
"completed_at": "2025-03-27T15:16:12.783042Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/p2set2eb8srme0cnv0hbbxxkcm/cancel",
"get": "https://api.replicate.com/v1/predictions/p2set2eb8srme0cnv0hbbxxkcm",
"stream": "https://stream.replicate.com/v1/files/bcwr-edntq4joqg7gxyinjpyihtnrttahr5mwbh3yo4quwmxtbhs25jsq",
"web": "https://replicate.com/p/p2set2eb8srme0cnv0hbbxxkcm"
},
"metrics": {
"predict_time": 27.267200649,
"total_time": 658.985042
}
}

