ComfyUI Node

Flux.2 (Replicate)

The flagship you'll never download

By Aryan185·Created about a year ago·Updated about a month ago· 14
Flux.2 (Replicate)
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image
promptA beautiful landscape
api_key
modelflux-2-max
aspect_ratio1:1
output_formatwebp
output_quality80

Flux.2 is Black Forest Labs' next-generation image model, and the honest thing to know is that the open-weight Flux.2 Dev is a beast to run - the KB's community history is full of "feels too bloated for the quality" and 35GB-plus-model-file complaints. This node sidesteps all of that by running Flux.2 Max, Pro, or Dev on Replicate, so the 50GB doesn't land on your disk or your VRAM. You get the flagship quality, you just rent it per image.

This is the "I want the current state of the art and I don't want to fight my hardware" node. For pure text-to-image with the newest Flux line, it's hard to beat from inside ComfyUI.

How it works

The node calls replicate.run() with the model and your prompt, converts any attached Comfy images to in-memory bytes, and hands them to Replicate as optional image inputs. Replicate runs the model and returns a URL to the output, which the node downloads and turns into a Comfy IMAGE. Notably, when you attach reference images, the node also sets a safety_tolerance on the request - the API-side filter stays on for multi-image work.

The inputs that matter

  • prompt - the creative input. Keep it vivid; the Flux line responds well to detail.
  • model - flux-2-max (default), flux-2-pro, or flux-2-dev. Max is the flagship quality, Dev is the "familiar but heavy" one, Pro sits between. Cost tracks the tier.
  • aspect_ratio - thirteen options from 1:1 through 21:9. Pick for framing before you render; Flux.2 handles aspect well.
  • output_format - webp (default), jpg, or png. WebP is the quality-per-byte winner; png if you need lossless.
  • output_quality - 0–100, default 80. With webp/jpg this is the visible quality knob; nudge up to 90+ for finals.
  • Optional image_1..image_5 - attach one or more reference images and this becomes image-to-image / multi-reference generation. This is the underrated part of the node: Flux.2 can take up to five references for character or style consistency.

There's no api_key-sized secret to the rest: the key goes in the field or as a .env variable name (REPLICATE_API_TOKEN).

The output

image - a single IMAGE, into preview/save.

Installing it

Pack install, as with everything from Aryan185/ComfyUI-ExternalAPI-Helpers:

cd ComfyUI/custom_nodes
git clone https://github.com/Aryan185/ComfyUI-ExternalAPI-Helpers.git
cd ComfyUI-ExternalAPI-Helpers
pip install -r requirements.txt

Restart ComfyUI; the node is under image/generation. Only replicate matters from the pack requirements for this one. Get a Replicate token from replicate.com/account/api-tokens, paste it in, or set REPLICATE_API_TOKEN in .env.

Where people get burned

Replicate charges per second of GPU time and Flux.2 models are not quick - Max especially. Check the model's per-second rate before you start a batch, or the "quick iteration" workflow quietly becomes the expensive one. Also, this is the hosted API: no LoRAs, no custom checkpoints, no control nets. It's the stock model or nothing. If you've built a local Flux.2 workflow with LoRAs and ControlNet, this node isn't a replacement - it's the "I need a clean render and my GPU is busy" fallback.

Also worth knowing: the open-weight Flux.2 Dev has a non-commercial license on the BFL side, but when you run via Replicate you're buying an inference on Replicate's infrastructure under their terms - the licensing calculus is different (and generally safer for you) than self-hosting the weights. If you're producing commercial work, running via API dodges the self-host license question entirely.

Categoryimage/generation

Inputs (11)

NameTypeDefaultDescription
promptSTRINGA beautiful landscape
api_keySTRINGDirectly put Replicate API token or .env variable name (REPLICATE_API_TOKEN)
modelCOMBOflux-2-max3 options: flux-2-max, flux-2-pro, flux-2-dev
aspect_ratioCOMBO1:113 options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, +7
output_formatCOMBOwebp3 options: webp, jpg, png
output_qualityINT800–100
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE