ComfyUI Node

🎨 Flux Pro Integrative

This node is BFL's API in a box

By ShmuelRonenΒ·Created 12 months agoΒ·Updated 12 months agoΒ· 0
🎨 Flux Pro Integrative
  • image_prompt
  • image
  • info
β—„modegenerateβ–Ί
β—„promptβ–Ί
β—„api_keyβ–Ί
β—„image_prompt_strength0.5β–Ί
β—„ultra_modetrueβ–Ί
β—„aspect_ratio16:9β–Ί
β—„safety_tolerance6β–Ί
β—„output_formatpngβ–Ί
β—„rawfalseβ–Ί
β—„seed-1β–Ί
β—„finetune_zipβ–Ί
β—„finetune_commentComfyUI Finetuneβ–Ί
β—„finetune_idβ–Ί
β—„trigger_wordTOKβ–Ί
β—„finetune_modegeneralβ–Ί
β—„iterations300β–Ί
β—„learning_rate0.0000β–Ί
β—„captioningtrueβ–Ί
β—„priorityqualityβ–Ί
β—„finetune_typefullβ–Ί
β—„lora_rank32β–Ί
β—„finetune_strength1.2β–Ί

The name makes it sound like another local FLUX workflow, so let's clear that up first: FluxProIntegrative doesn't run FLUX on your machine and doesn't need a GPU at all. It's a wrapper around Black Forest Labs' hosted FLUX API. You hand it a prompt (and optionally an image or a trained-model ID), it phones home to api.bfl.ai, and it comes back with a finished image. The price of admission is a BFL API key and a few cents per image - not a 12B model squeezed into quantized bits on a card you had to buy.

It's a legitimate pitch. FLUX 1.1 Pro Ultra is the hosted flagship of the same architecture the local community runs as FLUX.1 dev, and this node gets you that tier without the hardware or the quantization dance. Reach for it when your rig can't hold a transformer but you want the 2K+ photorealistic output anyway, or when training a custom model without babysitting the job on your own box.

How it works

Under the hood it's one node class (FluxProIntegrative) wrapping a FluxAPIClient, and it works the way the BFL API works: asynchronously. You submit a task, get back a task_id plus a polling URL, then the client polls until the image is ready - with up to 15 retries and exponential backoff, so network hiccups usually sort themselves out. Generation hits flux-pro-1.1-ultra when ultra_mode is on and flux-pro-1.1 otherwise; feed it an image_prompt and it base64-encodes the tensor as an image-to-image reference. Requests run through a persistent requests.Session with your key in the X-Key header.

One behavior to know: the node never crashes the queue. On failure it returns a blank 512Γ—512 gray image plus an info string starting with ERROR: - that second output is the one to read. Friendly for debugging, but a trap if you only wire the image to a Preview node and wonder about the gray boxes.

The inputs that matter

mode and prompt are the only required inputs; everything else is optional. The few you'll actually touch:

  • mode - generate, finetune, or inference. This one selector runs three completely different workflows.
  • prompt - multiline, standard text-to-image.
  • ultra_mode (default on) - the difference between 1.1 Pro and 1.1 Pro Ultra: better quality, slightly higher price.
  • aspect_ratio - seven options from 21:9 down to 9:21; 16:9 default.
  • seed - -1 for random, set a number to reproduce a result.
  • api_key - optional, because config.ini or an env var works too (below).

The outputs are image (a normal IMAGE tensor, so it wires straight into a Preview Image node) and info (a STRING carrying the task ID, finetune ID, or error message).

Finetune mode: the fun part, and the trap

Flip mode to finetune and this becomes a hosted finetune client. Point finetune_zip at a ZIP of 5–20 training images, set a finetune_comment and a trigger_word (default TOK), pick a finetune_mode (character/product/style/general) and a finetune_type (full or LoRA, lora_rank 8–128). Training runs on BFL's servers - the "no local GPU" benefit taken to its extreme - and costs $2–6 a job depending on iterations. Then mode: inference regenerates with finetune_id and finetune_strength (0.8–1.5 is the sensible range; crank past that and you get artifacts).

Here's the trap: finetune mode doesn't produce an image. It returns that blank gray image and puts the new finetune_id in the info string. Working as designed, not a bug - but a beginner who runs it will absolutely think it's broken. Read the info output, grab the ID, switch to inference.

Installing it

Install is boring in the good way: no model downloads, and the only dependencies are requests, Pillow, numpy, and torch - all things ComfyUI already ships.

cd ComfyUI/custom_nodes
git clone https://github.com/ShmuelRonen/flux_pro_integrative
# restart ComfyUI

Or search "Flux Pro Integrative" in ComfyUI Manager and hit install - it appears as "🎨 Flux Pro Integrative" under BFL/Flux Pro. There's no config.ini in the repo; you create it in the node directory:

[API]
X_KEY=your_actual_api_key_here

Or skip the file entirely: set a FLUX_X_KEY environment variable, or paste the key into the node's api_key input, which overrides everything. Get a key from the BFL API portal (api.us1.bfl.ai).

Where people get burned

  • "Node not properly initialized" / "Config file not found" - the node hunts for config.ini in the node dir, then ComfyUI/config.ini, then the working directory. Check the key has no stray spaces; the env-var and GUI-key routes sidestep the file entirely.
  • Blank image + ERROR: HTTP 401 - invalid or expired key. 429 is rate limiting (wait), 500 is BFL's problem (retry later).
  • Ignoring the info output - it's your only window into what happened, especially in finetune mode. Wire it to a Display Any node while you're learning.

Honest caveat: this is a small, low-traffic pack from a single author, and BFL is actively shipping so the API layer can change under you. For hosted FLUX it does the job, and the retry logic is genuinely solid - one of the cleaner API wrappers out there.

CategoryBFL/Flux Pro

Inputs (23)

NameTypeDefaultDescription
modeCOMBOgenerateMode: generate=create image, finetune=train model, inference=use trained model
promptSTRINGText description of the image to generate
api_keyoptSTRINGBFL API Key (optional - can use config.ini instead)
image_promptoptIMAGEInput image for image-to-image generation or style reference
image_prompt_strengthoptFLOAT0.50.1–1Strength of image prompt influence (0.1=weak, 1.0=strong)
ultra_modeoptBOOLEANtrueUse Ultra mode for higher quality
aspect_ratiooptCOMBO16:97 options: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, +1
safety_toleranceoptINT60–6Safety filter strength (0=strict, 6=permissive)
output_formatoptCOMBOpng2 options: png, jpeg
rawoptBOOLEANfalseSkip safety checks (Ultra mode only)
seedoptINT-1Random seed (-1 for random)
finetune_zipoptSTRINGPath to ZIP file with training images
finetune_commentoptSTRINGComfyUI FinetuneDescription for the finetune job
finetune_idoptSTRINGID of existing finetune for inference
trigger_wordoptSTRINGTOKWord to trigger the finetune style
finetune_modeoptCOMBOgeneral4 options: character, product, style, general
iterationsoptINT300100–2000Training iterations
learning_rateoptFLOAT0.00000.00001–0.0001β€”
captioningoptBOOLEANtrueAuto-generate captions for training images
priorityoptCOMBOquality2 options: speed, quality
finetune_typeoptCOMBOfull2 options: full, lora
lora_rankoptINT328–128β€”
finetune_strengthoptFLOAT1.20.1–2Strength of finetune effect

Outputs (2)

NameTypeDescription
imageIMAGEβ€”
infoSTRINGβ€”