Nodes/zhangp365/ComfyUI-utils-nodes/Replicate Image Request
ComfyUI Node

Replicate Image Request

Calling Replicate's hosted Flux Dev from inside ComfyUI

By zhangp365·Created 2 years ago·Updated 5 months ago· 135
Replicate Image Request
  • image
  • image
  • width
  • height
  • url
promptstyle of 80s cyberpunk, a portrait photo
seed0
aspect_ratio1:1
steps28
guidance3.5
go_fasttrue
api_key
lora_path
lora_scale1.00
extra_lora
extra_lora_scale1.0
modelblack-forest-labs/flux-dev-lora
num_outputs1
timeout60

This node doesn't generate anything locally - it's an API client wired into ComfyUI's node graph. Fill in a prompt and an API key, and it makes a real network call to Replicate, runs generation on Replicate's own GPUs, and hands the result back into your workflow. It's one of several *RequestNode entries this pack has grown alongside its original image-editing utilities - the README also lists equivalents for FAL, Volcano, and Novita - all of which follow the same shape: this pack isn't just local ComfyUI glue anymore, it's also become a thin wrapper layer over a handful of paid, hosted generation APIs.

What it's actually calling

The default model is black-forest-labs/flux-dev-lora - Replicate's hosted Flux Dev endpoint with built-in LoRA support. That's Black Forest Labs' FLUX.1 Dev running on someone else's infrastructure, which matters for one reason worth knowing: FLUX.1 Dev's own license is a non-commercial one with restrictions on how derivatives and outputs can be used, and that license travels with the model regardless of who's hosting it. Using this node through Replicate doesn't change what you're allowed to do with the model - it changes where the compute runs, not the terms you're generating under.

The fields that matter

  • prompt - required, multiline, defaults to a sample cyberpunk-portrait prompt so you can see the node working before you write your own.
  • seed - required, standard noise seed.
  • aspect_ratio - required, 11 presets from 1:1 up through wide (21:9) and tall (9:21) options, default 1:1.
  • steps (default 28) and guidance (default 3.5) - Flux Dev's usual sampling defaults, tunable here same as you'd expect locally.
  • go_fast (default true) - a speed-oriented mode on Replicate's side of the endpoint.
  • api_key (optional) - your own Replicate key. Without one, expect the request to fail outright; this node has no free tier of its own, it's a pass-through to your Replicate account.
  • lora_path / lora_scale and extra_lora / extra_lora_scale - up to two LoRAs applied on top of the base model, each with its own strength (0–2).
  • model (optional string, defaults to black-forest-labs/flux-dev-lora) - swappable if you want to point this at a different Replicate model entirely.
  • num_outputs (1–10) - request multiple images in one call.
  • image (optional IMAGE) - only meaningful if you swap model to a Replicate endpoint that actually accepts an image input; the default flux-dev-lora is text-to-image only.
  • timeout (default 60 seconds, up to 3000) - how long to wait before giving up on the request.

Outputs: image, width, height, and url - the last one being the actual URL Replicate returned, worth keeping around if you need to reference or re-download the result outside ComfyUI.

Installing it

ComfyUI Manager: search "ComfyUI-utils-nodes." Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/zhangp365/ComfyUI-utils-nodes

Restart ComfyUI. No local model download - the compute lives on Replicate's side entirely.

What to actually watch for

This costs real money per call, on your Replicate account, separate from anything ComfyUI or your GPU is doing - treat num_outputs and any batch loop around this node with that in mind before you fire off a large run. timeout is the other practical trap: 60 seconds is tight for a busy Replicate queue or a slower model, and hitting it mid-request means you paid for a generation you never got the result from - raise it if you're seeing intermittent failures rather than assuming the node itself is broken.

Categoryutils/image

Inputs (15)

NameTypeDefaultDescription
promptSTRINGstyle of 80s cyberpunk, a portrait photo
seedINT00–18446744073709550000The random seed used for creating the noise.
aspect_ratioCOMBO1:111 options: 1:1, 16:9, 21:9, 3:2, 4:3, 5:4, +5
stepsINT281–100
guidanceFLOAT3.50.1–100
go_fastBOOLEANtrue
api_keyoptSTRING
lora_pathoptSTRING
lora_scaleoptFLOAT1.000–2
extra_loraoptSTRING
extra_lora_scaleoptFLOAT1.00–2
modeloptSTRINGblack-forest-labs/flux-dev-lora
num_outputsoptINT11–10
imageoptIMAGE
timeoutoptINT601–3000

Outputs (4)

NameTypeDescription
imageIMAGE
widthINT
heightINT
urlSTRING