typetext
{
"force_reset_cache": false,
"input_file": "https://replicate.delivery/pbxt/M0thZEtgFzwMEXi0gFMBZyAP9CLFBf7VqoclcBj4r8UY79Ac/guy.webp",
"output_format": "webp",
"output_quality": 80,
"randomise_seeds": true,
"return_temp_files": false,
"workflow_json": "{\n \"6\": {\n\"inputs\": {\n\"text\": \"a guy in a suit and tie\",\n\"clip\": [\n\"11\",\n0\n ]\n },\n\"class_type\": \"CLIPTextEncode\",\n\"_meta\": {\n\"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n\"8\": {\n\"inputs\": {\n\"samples\": [\n\"13\",\n0\n ],\n\"vae\": [\n\"10\",\n0\n ]\n },\n\"class_type\": \"VAEDecode\",\n\"_meta\": {\n\"title\": \"VAE Decode\"\n }\n },\n\"9\": {\n\"inputs\": {\n\"filename_prefix\": \"ComfyUI\",\n\"images\": [\n\"8\",\n0\n ]\n },\n\"class_type\": \"SaveImage\",\n\"_meta\": {\n\"title\": \"Save Image\"\n }\n },\n\"10\": {\n\"inputs\": {\n\"vae_name\": \"ae.safetensors\"\n },\n\"class_type\": \"VAELoader\",\n\"_meta\": {\n\"title\": \"Load VAE\"\n }\n },\n\"11\": {\n\"inputs\": {\n\"clip_name1\": \"t5xxl_fp16.safetensors\",\n\"clip_name2\": \"clip_l.safetensors\",\n\"type\": \"flux\"\n },\n\"class_type\": \"DualCLIPLoader\",\n\"_meta\": {\n\"title\": \"DualCLIPLoader\"\n }\n },\n\"12\": {\n\"inputs\": {\n\"unet_name\": \"flux1-dev.safetensors\",\n\"weight_dtype\": \"default\"\n },\n\"class_type\": \"UNETLoader\",\n\"_meta\": {\n\"title\": \"Load Diffusion Model\"\n }\n },\n\"13\": {\n\"inputs\": {\n\"noise\": [\n\"25\",\n0\n ],\n\"guider\": [\n\"22\",\n0\n ],\n\"sampler\": [\n\"16\",\n0\n ],\n\"sigmas\": [\n\"17\",\n0\n ],\n\"latent_image\": [\n\"27\",\n0\n ]\n },\n\"class_type\": \"SamplerCustomAdvanced\",\n\"_meta\": {\n\"title\": \"SamplerCustomAdvanced\"\n }\n },\n\"16\": {\n\"inputs\": {\n\"sampler_name\": \"euler\"\n },\n\"class_type\": \"KSamplerSelect\",\n\"_meta\": {\n\"title\": \"KSamplerSelect\"\n }\n },\n\"17\": {\n\"inputs\": {\n\"scheduler\": \"simple\",\n\"steps\": 20,\n\"denoise\": 1,\n\"model\": [\n\"30\",\n0\n ]\n },\n\"class_type\": \"BasicScheduler\",\n\"_meta\": {\n\"title\": \"BasicScheduler\"\n }\n },\n\"22\": {\n\"inputs\": {\n\"model\": [\n\"30\",\n0\n ],\n\"conditioning\": [\n\"41\",\n0\n ]\n },\n\"class_type\": \"BasicGuider\",\n\"_meta\": {\n\"title\": \"BasicGuider\"\n }\n },\n\"25\": {\n\"inputs\": {\n\"noise_seed\": 603870403701160\n },\n\"class_type\": \"RandomNoise\",\n\"_meta\": {\n\"title\": \"RandomNoise\"\n }\n },\n\"26\": {\n\"inputs\": {\n\"guidance\": 2.5,\n\"conditioning\": [\n\"6\",\n0\n ]\n },\n\"class_type\": \"FluxGuidance\",\n\"_meta\": {\n\"title\": \"FluxGuidance\"\n }\n },\n\"27\": {\n\"inputs\": {\n\"width\": 1024,\n\"height\": 1024,\n\"batch_size\": 1\n },\n\"class_type\": \"EmptySD3LatentImage\",\n\"_meta\": {\n\"title\": \"EmptySD3LatentImage\"\n }\n },\n\"30\": {\n\"inputs\": {\n\"max_shift\": 1.15,\n\"base_shift\": 0.5,\n\"width\": 1024,\n\"height\": 1024,\n\"model\": [\n\"12\",\n0\n ]\n },\n\"class_type\": \"ModelSamplingFlux\",\n\"_meta\": {\n\"title\": \"ModelSamplingFlux\"\n }\n },\n\"38\": {\n\"inputs\": {\n\"clip_name\": \"sigclip_vision_patch14_384.safetensors\"\n },\n\"class_type\": \"CLIPVisionLoader\",\n\"_meta\": {\n\"title\": \"Load CLIP Vision\"\n }\n },\n\"39\": {\n\"inputs\": {\n\"clip_vision\": [\n\"38\",\n0\n ],\n\"image\": [\n\"40\",\n0\n ]\n },\n\"class_type\": \"CLIPVisionEncode\",\n\"_meta\": {\n\"title\": \"CLIP Vision Encode\"\n }\n },\n\"40\": {\n\"inputs\": {\n\"image\": \"input.webp\",\n\"upload\": \"image\"\n },\n\"class_type\": \"LoadImage\",\n\"_meta\": {\n\"title\": \"Load Image\"\n }\n },\n\"41\": {\n\"inputs\": {\n\"conditioning\": [\n\"26\",\n0\n ],\n\"style_model\": [\n\"42\",\n0\n ],\n\"clip_vision_output\": [\n\"39\",\n0\n ]\n },\n\"class_type\": \"StyleModelApply\",\n\"_meta\": {\n\"title\": \"Apply Style Model\"\n }\n },\n\"42\": {\n\"inputs\": {\n\"style_model_name\": \"flux1-redux-dev.safetensors\"\n },\n\"class_type\": \"StyleModelLoader\",\n\"_meta\": {\n\"title\": \"Load Style Model\"\n }\n }\n}"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_KXn**********************************
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 comfyui/any-comfyui-workflow using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"comfyui/any-comfyui-workflow:a008de98fb9c7d8f1ff0da5222380708eee317e2976bb34b11c230a910d76a22",
{
input: {
force_reset_cache: false,
input_file: "https://replicate.delivery/pbxt/M0thZEtgFzwMEXi0gFMBZyAP9CLFBf7VqoclcBj4r8UY79Ac/guy.webp",
output_format: "webp",
output_quality: 80,
randomise_seeds: true,
return_temp_files: false,
workflow_json: "{\n \"6\": {\n\"inputs\": {\n\"text\": \"a guy in a suit and tie\",\n\"clip\": [\n\"11\",\n0\n ]\n },\n\"class_type\": \"CLIPTextEncode\",\n\"_meta\": {\n\"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n\"8\": {\n\"inputs\": {\n\"samples\": [\n\"13\",\n0\n ],\n\"vae\": [\n\"10\",\n0\n ]\n },\n\"class_type\": \"VAEDecode\",\n\"_meta\": {\n\"title\": \"VAE Decode\"\n }\n },\n\"9\": {\n\"inputs\": {\n\"filename_prefix\": \"ComfyUI\",\n\"images\": [\n\"8\",\n0\n ]\n },\n\"class_type\": \"SaveImage\",\n\"_meta\": {\n\"title\": \"Save Image\"\n }\n },\n\"10\": {\n\"inputs\": {\n\"vae_name\": \"ae.safetensors\"\n },\n\"class_type\": \"VAELoader\",\n\"_meta\": {\n\"title\": \"Load VAE\"\n }\n },\n\"11\": {\n\"inputs\": {\n\"clip_name1\": \"t5xxl_fp16.safetensors\",\n\"clip_name2\": \"clip_l.safetensors\",\n\"type\": \"flux\"\n },\n\"class_type\": \"DualCLIPLoader\",\n\"_meta\": {\n\"title\": \"DualCLIPLoader\"\n }\n },\n\"12\": {\n\"inputs\": {\n\"unet_name\": \"flux1-dev.safetensors\",\n\"weight_dtype\": \"default\"\n },\n\"class_type\": \"UNETLoader\",\n\"_meta\": {\n\"title\": \"Load Diffusion Model\"\n }\n },\n\"13\": {\n\"inputs\": {\n\"noise\": [\n\"25\",\n0\n ],\n\"guider\": [\n\"22\",\n0\n ],\n\"sampler\": [\n\"16\",\n0\n ],\n\"sigmas\": [\n\"17\",\n0\n ],\n\"latent_image\": [\n\"27\",\n0\n ]\n },\n\"class_type\": \"SamplerCustomAdvanced\",\n\"_meta\": {\n\"title\": \"SamplerCustomAdvanced\"\n }\n },\n\"16\": {\n\"inputs\": {\n\"sampler_name\": \"euler\"\n },\n\"class_type\": \"KSamplerSelect\",\n\"_meta\": {\n\"title\": \"KSamplerSelect\"\n }\n },\n\"17\": {\n\"inputs\": {\n\"scheduler\": \"simple\",\n\"steps\": 20,\n\"denoise\": 1,\n\"model\": [\n\"30\",\n0\n ]\n },\n\"class_type\": \"BasicScheduler\",\n\"_meta\": {\n\"title\": \"BasicScheduler\"\n }\n },\n\"22\": {\n\"inputs\": {\n\"model\": [\n\"30\",\n0\n ],\n\"conditioning\": [\n\"41\",\n0\n ]\n },\n\"class_type\": \"BasicGuider\",\n\"_meta\": {\n\"title\": \"BasicGuider\"\n }\n },\n\"25\": {\n\"inputs\": {\n\"noise_seed\": 603870403701160\n },\n\"class_type\": \"RandomNoise\",\n\"_meta\": {\n\"title\": \"RandomNoise\"\n }\n },\n\"26\": {\n\"inputs\": {\n\"guidance\": 2.5,\n\"conditioning\": [\n\"6\",\n0\n ]\n },\n\"class_type\": \"FluxGuidance\",\n\"_meta\": {\n\"title\": \"FluxGuidance\"\n }\n },\n\"27\": {\n\"inputs\": {\n\"width\": 1024,\n\"height\": 1024,\n\"batch_size\": 1\n },\n\"class_type\": \"EmptySD3LatentImage\",\n\"_meta\": {\n\"title\": \"EmptySD3LatentImage\"\n }\n },\n\"30\": {\n\"inputs\": {\n\"max_shift\": 1.15,\n\"base_shift\": 0.5,\n\"width\": 1024,\n\"height\": 1024,\n\"model\": [\n\"12\",\n0\n ]\n },\n\"class_type\": \"ModelSamplingFlux\",\n\"_meta\": {\n\"title\": \"ModelSamplingFlux\"\n }\n },\n\"38\": {\n\"inputs\": {\n\"clip_name\": \"sigclip_vision_patch14_384.safetensors\"\n },\n\"class_type\": \"CLIPVisionLoader\",\n\"_meta\": {\n\"title\": \"Load CLIP Vision\"\n }\n },\n\"39\": {\n\"inputs\": {\n\"clip_vision\": [\n\"38\",\n0\n ],\n\"image\": [\n\"40\",\n0\n ]\n },\n\"class_type\": \"CLIPVisionEncode\",\n\"_meta\": {\n\"title\": \"CLIP Vision Encode\"\n }\n },\n\"40\": {\n\"inputs\": {\n\"image\": \"input.webp\",\n\"upload\": \"image\"\n },\n\"class_type\": \"LoadImage\",\n\"_meta\": {\n\"title\": \"Load Image\"\n }\n },\n\"41\": {\n\"inputs\": {\n\"conditioning\": [\n\"26\",\n0\n ],\n\"style_model\": [\n\"42\",\n0\n ],\n\"clip_vision_output\": [\n\"39\",\n0\n ]\n },\n\"class_type\": \"StyleModelApply\",\n\"_meta\": {\n\"title\": \"Apply Style Model\"\n }\n },\n\"42\": {\n\"inputs\": {\n\"style_model_name\": \"flux1-redux-dev.safetensors\"\n },\n\"class_type\": \"StyleModelLoader\",\n\"_meta\": {\n\"title\": \"Load Style Model\"\n }\n }\n}"
}
}
);
// 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_KXn**********************************
This is your API token. Keep it to yourself.
import replicate
Run comfyui/any-comfyui-workflow using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"comfyui/any-comfyui-workflow:a008de98fb9c7d8f1ff0da5222380708eee317e2976bb34b11c230a910d76a22",
input={
"force_reset_cache": False,
"input_file": "https://replicate.delivery/pbxt/M0thZEtgFzwMEXi0gFMBZyAP9CLFBf7VqoclcBj4r8UY79Ac/guy.webp",
"output_format": "webp",
"output_quality": 80,
"randomise_seeds": True,
"return_temp_files": False,
"workflow_json": "{\n \"6\": {\n\"inputs\": {\n\"text\": \"a guy in a suit and tie\",\n\"clip\": [\n\"11\",\n0\n ]\n },\n\"class_type\": \"CLIPTextEncode\",\n\"_meta\": {\n\"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n\"8\": {\n\"inputs\": {\n\"samples\": [\n\"13\",\n0\n ],\n\"vae\": [\n\"10\",\n0\n ]\n },\n\"class_type\": \"VAEDecode\",\n\"_meta\": {\n\"title\": \"VAE Decode\"\n }\n },\n\"9\": {\n\"inputs\": {\n\"filename_prefix\": \"ComfyUI\",\n\"images\": [\n\"8\",\n0\n ]\n },\n\"class_type\": \"SaveImage\",\n\"_meta\": {\n\"title\": \"Save Image\"\n }\n },\n\"10\": {\n\"inputs\": {\n\"vae_name\": \"ae.safetensors\"\n },\n\"class_type\": \"VAELoader\",\n\"_meta\": {\n\"title\": \"Load VAE\"\n }\n },\n\"11\": {\n\"inputs\": {\n\"clip_name1\": \"t5xxl_fp16.safetensors\",\n\"clip_name2\": \"clip_l.safetensors\",\n\"type\": \"flux\"\n },\n\"class_type\": \"DualCLIPLoader\",\n\"_meta\": {\n\"title\": \"DualCLIPLoader\"\n }\n },\n\"12\": {\n\"inputs\": {\n\"unet_name\": \"flux1-dev.safetensors\",\n\"weight_dtype\": \"default\"\n },\n\"class_type\": \"UNETLoader\",\n\"_meta\": {\n\"title\": \"Load Diffusion Model\"\n }\n },\n\"13\": {\n\"inputs\": {\n\"noise\": [\n\"25\",\n0\n ],\n\"guider\": [\n\"22\",\n0\n ],\n\"sampler\": [\n\"16\",\n0\n ],\n\"sigmas\": [\n\"17\",\n0\n ],\n\"latent_image\": [\n\"27\",\n0\n ]\n },\n\"class_type\": \"SamplerCustomAdvanced\",\n\"_meta\": {\n\"title\": \"SamplerCustomAdvanced\"\n }\n },\n\"16\": {\n\"inputs\": {\n\"sampler_name\": \"euler\"\n },\n\"class_type\": \"KSamplerSelect\",\n\"_meta\": {\n\"title\": \"KSamplerSelect\"\n }\n },\n\"17\": {\n\"inputs\": {\n\"scheduler\": \"simple\",\n\"steps\": 20,\n\"denoise\": 1,\n\"model\": [\n\"30\",\n0\n ]\n },\n\"class_type\": \"BasicScheduler\",\n\"_meta\": {\n\"title\": \"BasicScheduler\"\n }\n },\n\"22\": {\n\"inputs\": {\n\"model\": [\n\"30\",\n0\n ],\n\"conditioning\": [\n\"41\",\n0\n ]\n },\n\"class_type\": \"BasicGuider\",\n\"_meta\": {\n\"title\": \"BasicGuider\"\n }\n },\n\"25\": {\n\"inputs\": {\n\"noise_seed\": 603870403701160\n },\n\"class_type\": \"RandomNoise\",\n\"_meta\": {\n\"title\": \"RandomNoise\"\n }\n },\n\"26\": {\n\"inputs\": {\n\"guidance\": 2.5,\n\"conditioning\": [\n\"6\",\n0\n ]\n },\n\"class_type\": \"FluxGuidance\",\n\"_meta\": {\n\"title\": \"FluxGuidance\"\n }\n },\n\"27\": {\n\"inputs\": {\n\"width\": 1024,\n\"height\": 1024,\n\"batch_size\": 1\n },\n\"class_type\": \"EmptySD3LatentImage\",\n\"_meta\": {\n\"title\": \"EmptySD3LatentImage\"\n }\n },\n\"30\": {\n\"inputs\": {\n\"max_shift\": 1.15,\n\"base_shift\": 0.5,\n\"width\": 1024,\n\"height\": 1024,\n\"model\": [\n\"12\",\n0\n ]\n },\n\"class_type\": \"ModelSamplingFlux\",\n\"_meta\": {\n\"title\": \"ModelSamplingFlux\"\n }\n },\n\"38\": {\n\"inputs\": {\n\"clip_name\": \"sigclip_vision_patch14_384.safetensors\"\n },\n\"class_type\": \"CLIPVisionLoader\",\n\"_meta\": {\n\"title\": \"Load CLIP Vision\"\n }\n },\n\"39\": {\n\"inputs\": {\n\"clip_vision\": [\n\"38\",\n0\n ],\n\"image\": [\n\"40\",\n0\n ]\n },\n\"class_type\": \"CLIPVisionEncode\",\n\"_meta\": {\n\"title\": \"CLIP Vision Encode\"\n }\n },\n\"40\": {\n\"inputs\": {\n\"image\": \"input.webp\",\n\"upload\": \"image\"\n },\n\"class_type\": \"LoadImage\",\n\"_meta\": {\n\"title\": \"Load Image\"\n }\n },\n\"41\": {\n\"inputs\": {\n\"conditioning\": [\n\"26\",\n0\n ],\n\"style_model\": [\n\"42\",\n0\n ],\n\"clip_vision_output\": [\n\"39\",\n0\n ]\n },\n\"class_type\": \"StyleModelApply\",\n\"_meta\": {\n\"title\": \"Apply Style Model\"\n }\n },\n\"42\": {\n\"inputs\": {\n\"style_model_name\": \"flux1-redux-dev.safetensors\"\n },\n\"class_type\": \"StyleModelLoader\",\n\"_meta\": {\n\"title\": \"Load Style Model\"\n }\n }\n}"
}
)
# 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_KXn**********************************
This is your API token. Keep it to yourself.
Run comfyui/any-comfyui-workflow 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": "comfyui/any-comfyui-workflow:a008de98fb9c7d8f1ff0da5222380708eee317e2976bb34b11c230a910d76a22",
"input": {
"force_reset_cache": false,
"input_file": "https://replicate.delivery/pbxt/M0thZEtgFzwMEXi0gFMBZyAP9CLFBf7VqoclcBj4r8UY79Ac/guy.webp",
"output_format": "webp",
"output_quality": 80,
"randomise_seeds": true,
"return_temp_files": false,
"workflow_json": "{\\n \\"6\\": {\\n\\"inputs\\": {\\n\\"text\\": \\"a guy in a suit and tie\\",\\n\\"clip\\": [\\n\\"11\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"CLIPTextEncode\\",\\n\\"_meta\\": {\\n\\"title\\": \\"CLIP Text Encode (Positive Prompt)\\"\\n }\\n },\\n\\"8\\": {\\n\\"inputs\\": {\\n\\"samples\\": [\\n\\"13\\",\\n0\\n ],\\n\\"vae\\": [\\n\\"10\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"VAEDecode\\",\\n\\"_meta\\": {\\n\\"title\\": \\"VAE Decode\\"\\n }\\n },\\n\\"9\\": {\\n\\"inputs\\": {\\n\\"filename_prefix\\": \\"ComfyUI\\",\\n\\"images\\": [\\n\\"8\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"SaveImage\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Save Image\\"\\n }\\n },\\n\\"10\\": {\\n\\"inputs\\": {\\n\\"vae_name\\": \\"ae.safetensors\\"\\n },\\n\\"class_type\\": \\"VAELoader\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Load VAE\\"\\n }\\n },\\n\\"11\\": {\\n\\"inputs\\": {\\n\\"clip_name1\\": \\"t5xxl_fp16.safetensors\\",\\n\\"clip_name2\\": \\"clip_l.safetensors\\",\\n\\"type\\": \\"flux\\"\\n },\\n\\"class_type\\": \\"DualCLIPLoader\\",\\n\\"_meta\\": {\\n\\"title\\": \\"DualCLIPLoader\\"\\n }\\n },\\n\\"12\\": {\\n\\"inputs\\": {\\n\\"unet_name\\": \\"flux1-dev.safetensors\\",\\n\\"weight_dtype\\": \\"default\\"\\n },\\n\\"class_type\\": \\"UNETLoader\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Load Diffusion Model\\"\\n }\\n },\\n\\"13\\": {\\n\\"inputs\\": {\\n\\"noise\\": [\\n\\"25\\",\\n0\\n ],\\n\\"guider\\": [\\n\\"22\\",\\n0\\n ],\\n\\"sampler\\": [\\n\\"16\\",\\n0\\n ],\\n\\"sigmas\\": [\\n\\"17\\",\\n0\\n ],\\n\\"latent_image\\": [\\n\\"27\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"SamplerCustomAdvanced\\",\\n\\"_meta\\": {\\n\\"title\\": \\"SamplerCustomAdvanced\\"\\n }\\n },\\n\\"16\\": {\\n\\"inputs\\": {\\n\\"sampler_name\\": \\"euler\\"\\n },\\n\\"class_type\\": \\"KSamplerSelect\\",\\n\\"_meta\\": {\\n\\"title\\": \\"KSamplerSelect\\"\\n }\\n },\\n\\"17\\": {\\n\\"inputs\\": {\\n\\"scheduler\\": \\"simple\\",\\n\\"steps\\": 20,\\n\\"denoise\\": 1,\\n\\"model\\": [\\n\\"30\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"BasicScheduler\\",\\n\\"_meta\\": {\\n\\"title\\": \\"BasicScheduler\\"\\n }\\n },\\n\\"22\\": {\\n\\"inputs\\": {\\n\\"model\\": [\\n\\"30\\",\\n0\\n ],\\n\\"conditioning\\": [\\n\\"41\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"BasicGuider\\",\\n\\"_meta\\": {\\n\\"title\\": \\"BasicGuider\\"\\n }\\n },\\n\\"25\\": {\\n\\"inputs\\": {\\n\\"noise_seed\\": 603870403701160\\n },\\n\\"class_type\\": \\"RandomNoise\\",\\n\\"_meta\\": {\\n\\"title\\": \\"RandomNoise\\"\\n }\\n },\\n\\"26\\": {\\n\\"inputs\\": {\\n\\"guidance\\": 2.5,\\n\\"conditioning\\": [\\n\\"6\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"FluxGuidance\\",\\n\\"_meta\\": {\\n\\"title\\": \\"FluxGuidance\\"\\n }\\n },\\n\\"27\\": {\\n\\"inputs\\": {\\n\\"width\\": 1024,\\n\\"height\\": 1024,\\n\\"batch_size\\": 1\\n },\\n\\"class_type\\": \\"EmptySD3LatentImage\\",\\n\\"_meta\\": {\\n\\"title\\": \\"EmptySD3LatentImage\\"\\n }\\n },\\n\\"30\\": {\\n\\"inputs\\": {\\n\\"max_shift\\": 1.15,\\n\\"base_shift\\": 0.5,\\n\\"width\\": 1024,\\n\\"height\\": 1024,\\n\\"model\\": [\\n\\"12\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"ModelSamplingFlux\\",\\n\\"_meta\\": {\\n\\"title\\": \\"ModelSamplingFlux\\"\\n }\\n },\\n\\"38\\": {\\n\\"inputs\\": {\\n\\"clip_name\\": \\"sigclip_vision_patch14_384.safetensors\\"\\n },\\n\\"class_type\\": \\"CLIPVisionLoader\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Load CLIP Vision\\"\\n }\\n },\\n\\"39\\": {\\n\\"inputs\\": {\\n\\"clip_vision\\": [\\n\\"38\\",\\n0\\n ],\\n\\"image\\": [\\n\\"40\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"CLIPVisionEncode\\",\\n\\"_meta\\": {\\n\\"title\\": \\"CLIP Vision Encode\\"\\n }\\n },\\n\\"40\\": {\\n\\"inputs\\": {\\n\\"image\\": \\"input.webp\\",\\n\\"upload\\": \\"image\\"\\n },\\n\\"class_type\\": \\"LoadImage\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Load Image\\"\\n }\\n },\\n\\"41\\": {\\n\\"inputs\\": {\\n\\"conditioning\\": [\\n\\"26\\",\\n0\\n ],\\n\\"style_model\\": [\\n\\"42\\",\\n0\\n ],\\n\\"clip_vision_output\\": [\\n\\"39\\",\\n0\\n ]\\n },\\n\\"class_type\\": \\"StyleModelApply\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Apply Style Model\\"\\n }\\n },\\n\\"42\\": {\\n\\"inputs\\": {\\n\\"style_model_name\\": \\"flux1-redux-dev.safetensors\\"\\n },\\n\\"class_type\\": \\"StyleModelLoader\\",\\n\\"_meta\\": {\\n\\"title\\": \\"Load Style Model\\"\\n }\\n }\\n}"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "9q93d0f1bhrmc0cka3vvks4nm0",
"model": "comfyui/any-comfyui-workflow",
"version": "a008de98fb9c7d8f1ff0da5222380708eee317e2976bb34b11c230a910d76a22",
"input": {
"force_reset_cache": false,
"input_file": "https://replicate.delivery/pbxt/M0thZEtgFzwMEXi0gFMBZyAP9CLFBf7VqoclcBj4r8UY79Ac/guy.webp",
"output_format": "webp",
"output_quality": 80,
"randomise_seeds": true,
"return_temp_files": false,
"workflow_json": "{\n \"6\": {\n\"inputs\": {\n\"text\": \"a guy in a suit and tie\",\n\"clip\": [\n\"11\",\n0\n ]\n },\n\"class_type\": \"CLIPTextEncode\",\n\"_meta\": {\n\"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n\"8\": {\n\"inputs\": {\n\"samples\": [\n\"13\",\n0\n ],\n\"vae\": [\n\"10\",\n0\n ]\n },\n\"class_type\": \"VAEDecode\",\n\"_meta\": {\n\"title\": \"VAE Decode\"\n }\n },\n\"9\": {\n\"inputs\": {\n\"filename_prefix\": \"ComfyUI\",\n\"images\": [\n\"8\",\n0\n ]\n },\n\"class_type\": \"SaveImage\",\n\"_meta\": {\n\"title\": \"Save Image\"\n }\n },\n\"10\": {\n\"inputs\": {\n\"vae_name\": \"ae.safetensors\"\n },\n\"class_type\": \"VAELoader\",\n\"_meta\": {\n\"title\": \"Load VAE\"\n }\n },\n\"11\": {\n\"inputs\": {\n\"clip_name1\": \"t5xxl_fp16.safetensors\",\n\"clip_name2\": \"clip_l.safetensors\",\n\"type\": \"flux\"\n },\n\"class_type\": \"DualCLIPLoader\",\n\"_meta\": {\n\"title\": \"DualCLIPLoader\"\n }\n },\n\"12\": {\n\"inputs\": {\n\"unet_name\": \"flux1-dev.safetensors\",\n\"weight_dtype\": \"default\"\n },\n\"class_type\": \"UNETLoader\",\n\"_meta\": {\n\"title\": \"Load Diffusion Model\"\n }\n },\n\"13\": {\n\"inputs\": {\n\"noise\": [\n\"25\",\n0\n ],\n\"guider\": [\n\"22\",\n0\n ],\n\"sampler\": [\n\"16\",\n0\n ],\n\"sigmas\": [\n\"17\",\n0\n ],\n\"latent_image\": [\n\"27\",\n0\n ]\n },\n\"class_type\": \"SamplerCustomAdvanced\",\n\"_meta\": {\n\"title\": \"SamplerCustomAdvanced\"\n }\n },\n\"16\": {\n\"inputs\": {\n\"sampler_name\": \"euler\"\n },\n\"class_type\": \"KSamplerSelect\",\n\"_meta\": {\n\"title\": \"KSamplerSelect\"\n }\n },\n\"17\": {\n\"inputs\": {\n\"scheduler\": \"simple\",\n\"steps\": 20,\n\"denoise\": 1,\n\"model\": [\n\"30\",\n0\n ]\n },\n\"class_type\": \"BasicScheduler\",\n\"_meta\": {\n\"title\": \"BasicScheduler\"\n }\n },\n\"22\": {\n\"inputs\": {\n\"model\": [\n\"30\",\n0\n ],\n\"conditioning\": [\n\"41\",\n0\n ]\n },\n\"class_type\": \"BasicGuider\",\n\"_meta\": {\n\"title\": \"BasicGuider\"\n }\n },\n\"25\": {\n\"inputs\": {\n\"noise_seed\": 603870403701160\n },\n\"class_type\": \"RandomNoise\",\n\"_meta\": {\n\"title\": \"RandomNoise\"\n }\n },\n\"26\": {\n\"inputs\": {\n\"guidance\": 2.5,\n\"conditioning\": [\n\"6\",\n0\n ]\n },\n\"class_type\": \"FluxGuidance\",\n\"_meta\": {\n\"title\": \"FluxGuidance\"\n }\n },\n\"27\": {\n\"inputs\": {\n\"width\": 1024,\n\"height\": 1024,\n\"batch_size\": 1\n },\n\"class_type\": \"EmptySD3LatentImage\",\n\"_meta\": {\n\"title\": \"EmptySD3LatentImage\"\n }\n },\n\"30\": {\n\"inputs\": {\n\"max_shift\": 1.15,\n\"base_shift\": 0.5,\n\"width\": 1024,\n\"height\": 1024,\n\"model\": [\n\"12\",\n0\n ]\n },\n\"class_type\": \"ModelSamplingFlux\",\n\"_meta\": {\n\"title\": \"ModelSamplingFlux\"\n }\n },\n\"38\": {\n\"inputs\": {\n\"clip_name\": \"sigclip_vision_patch14_384.safetensors\"\n },\n\"class_type\": \"CLIPVisionLoader\",\n\"_meta\": {\n\"title\": \"Load CLIP Vision\"\n }\n },\n\"39\": {\n\"inputs\": {\n\"clip_vision\": [\n\"38\",\n0\n ],\n\"image\": [\n\"40\",\n0\n ]\n },\n\"class_type\": \"CLIPVisionEncode\",\n\"_meta\": {\n\"title\": \"CLIP Vision Encode\"\n }\n },\n\"40\": {\n\"inputs\": {\n\"image\": \"input.webp\",\n\"upload\": \"image\"\n },\n\"class_type\": \"LoadImage\",\n\"_meta\": {\n\"title\": \"Load Image\"\n }\n },\n\"41\": {\n\"inputs\": {\n\"conditioning\": [\n\"26\",\n0\n ],\n\"style_model\": [\n\"42\",\n0\n ],\n\"clip_vision_output\": [\n\"39\",\n0\n ]\n },\n\"class_type\": \"StyleModelApply\",\n\"_meta\": {\n\"title\": \"Apply Style Model\"\n }\n },\n\"42\": {\n\"inputs\": {\n\"style_model_name\": \"flux1-redux-dev.safetensors\"\n },\n\"class_type\": \"StyleModelLoader\",\n\"_meta\": {\n\"title\": \"Load Style Model\"\n }\n }\n}"
},
"logs": "====================================\nInputs uploaded to /tmp/inputs:\ninput.webp\n====================================\nChecking inputs\n✅ /tmp/inputs/input.webp\n====================================\nChecking weights\n✅ clip_l.safetensors exists in ComfyUI/models/text_encoders\n✅ flux1-dev.safetensors exists in ComfyUI/models/diffusion_models\n✅ ae.safetensors exists in ComfyUI/models/vae\n✅ t5xxl_fp16.safetensors exists in ComfyUI/models/text_encoders\n✅ sigclip_vision_patch14_384.safetensors exists in ComfyUI/models/clip_vision\n✅ flux1-redux-dev.safetensors exists in ComfyUI/models/style_models\n====================================\nRandomising noise_seed to 1902677127\nRunning workflow\n[ComfyUI] got prompt\nExecuting node 26, title: FluxGuidance, class type: FluxGuidance\nExecuting node 41, title: Apply Style Model, class type: StyleModelApply\nExecuting node 22, title: BasicGuider, class type: BasicGuider\nExecuting node 25, title: RandomNoise, class type: RandomNoise\nExecuting node 13, title: SamplerCustomAdvanced, class type: SamplerCustomAdvanced\n[ComfyUI]\n[ComfyUI] 0%| | 0/20 [00:00<?, ?it/s]\n[ComfyUI] 5%|▌ | 1/20 [00:00<00:05, 3.46it/s]\n[ComfyUI] 10%|█ | 2/20 [00:00<00:08, 2.19it/s]\n[ComfyUI] 15%|█▌ | 3/20 [00:01<00:08, 1.96it/s]\n[ComfyUI] 20%|██ | 4/20 [00:02<00:08, 1.86it/s]\n[ComfyUI] 25%|██▌ | 5/20 [00:02<00:08, 1.81it/s]\n[ComfyUI] 30%|███ | 6/20 [00:03<00:07, 1.78it/s]\n[ComfyUI] 35%|███▌ | 7/20 [00:03<00:07, 1.77it/s]\n[ComfyUI] 40%|████ | 8/20 [00:04<00:06, 1.75it/s]\n[ComfyUI] 45%|████▌ | 9/20 [00:04<00:06, 1.74it/s]\n[ComfyUI] 50%|█████ | 10/20 [00:05<00:05, 1.74it/s]\n[ComfyUI] 55%|█████▌ | 11/20 [00:06<00:05, 1.74it/s]\n[ComfyUI] 60%|██████ | 12/20 [00:06<00:04, 1.73it/s]\n[ComfyUI] 65%|██████▌ | 13/20 [00:07<00:04, 1.73it/s]\n[ComfyUI] 70%|███████ | 14/20 [00:07<00:03, 1.73it/s]\n[ComfyUI] 75%|███████▌ | 15/20 [00:08<00:02, 1.73it/s]\n[ComfyUI] 80%|████████ | 16/20 [00:08<00:02, 1.72it/s]\n[ComfyUI] 85%|████████▌ | 17/20 [00:09<00:01, 1.72it/s]\n[ComfyUI] 90%|█████████ | 18/20 [00:10<00:01, 1.72it/s]\n[ComfyUI] 95%|█████████▌| 19/20 [00:10<00:00, 1.72it/s]\n[ComfyUI] 100%|██████████| 20/20 [00:11<00:00, 1.72it/s]\nExecuting node 8, title: VAE Decode, class type: VAEDecode\nExecuting node 9, title: Save Image, class type: SaveImage\n[ComfyUI] 100%|██████████| 20/20 [00:11<00:00, 1.77it/s]\n[ComfyUI] Prompt executed in 11.99 seconds\noutputs: {'9': {'images': [{'filename': 'ComfyUI_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nComfyUI_00001_.png",
"output": [
"https://replicate.delivery/xezq/qgHFkjO8mspNOpYRDLt2lmfIybffLFD5F9ZQJUSphydembNPB/ComfyUI_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-11-21T23:04:02.652Z",
"started_at": "2024-11-21T23:04:02.659554Z",
"completed_at": "2024-11-21T23:04:15.11743Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/9q93d0f1bhrmc0cka3vvks4nm0/cancel",
"get": "https://api.replicate.com/v1/predictions/9q93d0f1bhrmc0cka3vvks4nm0",
"stream": "https://stream.replicate.com/v1/files/bcwr-zowunpkndt7digjicyrjyttpmpl42xo5bmlxhttukjgx5ptdmwpq",
"web": "https://replicate.com/p/9q93d0f1bhrmc0cka3vvks4nm0"
},
"metrics": {
"predict_time": 12.457876127,
"total_time": 12.46543
}
}
