Nodes/ComfyUI-API-DockerCPU/Replicate black-forest-labs/flux-2-max
ComfyUI Node

Replicate black-forest-labs/flux-2-max

FLUX.2 Max, the flagship, on someone else's GPUs

By trustypangolinΒ·Created 5 months agoΒ·Updated about a month agoΒ· 0
Replicate black-forest-labs/flux-2-max
  • IMAGE_1
  • IMAGE_2
  • IMAGE_3
  • IMAGE_4
  • IMAGE_5
  • IMAGE_6
  • IMAGE_7
  • IMAGE_8
  • IMAGE
  • API_JSON
β—„dry_runfalseβ–Ί
β—„force_rerunfalseβ–Ί
β—„promptβ–Ί
β—„aspect_ratio1:1β–Ί
β—„resolution1 MPβ–Ί
β—„width0β–Ί
β—„height0β–Ί
β—„safety_tolerance2β–Ί
β—„seed0β–Ί
β—„output_formatwebpβ–Ί
β—„output_quality80β–Ί

FLUX.2 Max is Black Forest Labs' top-tier image model - the KB's Flux 2 panel describes the full family as the strongest open-weights image generation on paper, and Max is the high-fidelity end of that line. The catch, always, is hardware: the full 56B-parameter stack (32B transformer plus a 24B VLM text encoder) is the kind of thing that wants a data-center GPU. This node sidesteps the whole problem by running black-forest-labs/flux-2-max on Replicate's servers. On a CPU-only ComfyUI box, Max is otherwise just not an option - this is the only way you'll touch it.

The shape is the standard Replicate schema node: prompt in, IMAGE out (tensor), plus API_JSON (the payload that was sent). Inputs that matter:

  • aspect_ratio (default "1:1", eleven choices) - note it includes match_input_image and custom. With custom selected you take control of width and height directly (both 256–2048, default 0 meaning "model decides").
  • resolution (default "1 MP", or match_input_image / 0.5 / 2 / 4 MP) - Max is where 4 MP output actually earns its keep; this is a "highest fidelity" model, so pushing resolution is the point. It's also the main cost driver.
  • safety_tolerance (default 2, range 1–5) - Replicate's content filter strength. 1 is strictest, 5 is most permissive. This is the one knob people actually fiddle with, and it's worth knowing it exists because the default will refuse certain content.
  • seed (default 0) - Replicate is stateless, so this is your reproducibility control.
  • output_format (webp default, or jpg/png) and output_quality (80) - encoding. webp/jpg for deliverables; png if you're keeping it in an edit chain.
  • IMAGE_1 through IMAGE_8 - reference images. Max accepts up to eight, which is the family's party trick: the VLM encoder means it reasons over reference images in a way Flux 1's CLIP+T5 stack couldn't. Character consistency, style transfer, multi-image composition - this is where those workflows live.

Plus the pack-wide dry_run (test your wiring with no API call) and force_rerun (bust ComfyUI's cache and force a real generation).

Install is the shared pack flow - ComfyUI Manager (search ComfyUI-API-DockerCPU), or:

cd ComfyUI/custom_nodes
git clone https://github.com/trustypangolin/ComfyUI-API-DockerCPU
cd ComfyUI-API-DockerCPU
pip install -r requirements.txt

Set REPLICATE_API_TOKEN and restart. It's under 🎨 DockerCPU API/🎨 Replicate.

The economics deserve honesty: this is the most expensive generation node in the pack. Max at 4 MP is a different price class than Klein at 1 MP, and there's no free tier that'll soak up a whole batch. Dry-run before you commit, and if you're iterating on prompts, do it on Klein (the pack's Replicate black-forest-labs/flux-2-klein-9b node) and reserve Max for the finals - the models share the family's quality direction, and Klein at 1 MP is a cheap scout for Max at 4 MP. Also mind safety_tolerance: if something gets refused and you didn't know the knob existed, that's why.

Category🎨 DockerCPU API/🎨 Replicate

Inputs (19)

NameTypeDefaultDescription
dry_runBOOLEANfalseβ€”
force_rerunBOOLEANfalseβ€”
promptSTRINGβ€”
IMAGE_1optIMAGEβ€”
IMAGE_2optIMAGEβ€”
IMAGE_3optIMAGEβ€”
IMAGE_4optIMAGEβ€”
IMAGE_5optIMAGEβ€”
IMAGE_6optIMAGEβ€”
IMAGE_7optIMAGEβ€”
IMAGE_8optIMAGEβ€”
aspect_ratiooptCOMBO1:111 options: match_input_image, custom, 1:1, 16:9, 3:2, 2:3, +5
resolutionoptCOMBO1 MP5 options: match_input_image, 0.5 MP, 1 MP, 2 MP, 4 MP
widthoptINT0256–2048β€”
heightoptINT0256–2048β€”
safety_toleranceoptINT21–5β€”
seedoptINT0β€”
output_formatoptCOMBOwebp3 options: webp, jpg, png
output_qualityoptINT800–100β€”

Outputs (2)

NameTypeDescription
IMAGEIMAGEβ€”
API_JSONSTRINGβ€”