Extensions/ComfyUI-FLUX-BFL-API
ComfyUI Extension

ComfyUI-FLUX-BFL-API

Custom nodes for integrating Flux models with the BFL API.

By gelasdev·Created 2 years ago·Updated 7 days ago· 50
gelasdev/ComfyUI-FLUX-BFL-API
Nodes36
On cloudLocal install
CategoryBFL/Flux2, BFL/Flux3
Stars50
Updated7 days ago

Nodes (36)

Flux 2 Flex (BFL)

Where you iterate before you spend

BFL/Flux2
Flux 2 Klein 4B (BFL)

The Apache-2.0 Flux 2, over the API — with the licenses and hardware taken care of

BFL/Flux2
Flux 2 Klein 9B (BFL)

Flux 2's mid-size model without the 9B download

BFL/Flux2
Flux 2 Klein 9B Preview (BFL)

Klein 9B, with whatever BFL is shipping this week

BFL/Flux2
Flux 2 Max (BFL)

The flagship Flux 2 on any GPU — because you're not running 56B locally

BFL/Flux2
Flux 2 Pro (BFL)

Generation and editing in one node

BFL/Flux2
Flux 2 Pro Preview (BFL)

The bleeding edge of Flux 2, pre-stable — don't build your pipeline on it

BFL/Flux2
Flux 3 Image (BFL)

The FLUX 3 you can't download, wired into your graph

BFL/Flux3
Flux 3 Keyframes (BFL)

The glue node that makes Flux 3 I2V keyframes actually usable

BFL/Flux3
Flux 3 Video I2V (BFL)

FLUX 3 image-to-video from a keyframes string

BFL/Flux3
Flux 3 Video T2V (BFL)

FLUX 3 text-to-video from a single node — no local model, no GPU meltdown

BFL/Flux3
Flux 3 Video V2V (BFL)

Remix an existing clip with FLUX 3 video-to-video — bring your own MP4

BFL/Flux3
Flux Config (BFL)

How every BFL node in this pack gets its API key

BFL/Config
Flux Credits (BFL)

The 'how much did that render cost' node

BFL/Utility
Flux Deblur (BFL)

One image in, one sharp image out, no GPU and no prompt

BFL
Flux Delete Finetune (BFL)

Retire a custom Flux model for good

BFL/Finetune
Flux Dev (BFL)

The API tier that started it all

BFL
Flux Erase (BFL)

Object removal that actually leaves the rest alone

BFL
Flux Finetune Details (BFL)

The metadata drawer for a single custom Flux model

BFL/Finetune
Flux Finetune Status (BFL)

Is my custom Flux model done training yet?

BFL/Finetune
Flux Kontext Max (BFL)

The same Kontext editing, turned up to max quality

BFL
Flux Kontext Pro (BFL)

Edit photos by describing them, no mask, no Local Latent cache

BFL
Flux My Finetunes (BFL)

See every custom Flux model on your BFL account

BFL/Finetune
Flux Outpaint (BFL)

Outpainting where you decide the canvas, not the model

BFL
Flux Pro 1.1 (BFL)

Flux Pro 1.1 is the best Flux you'll never download — here's how to run it in ComfyUI anyway

BFL
Flux Pro 1.1 Ultra (BFL)

The overkill sibling, tamed into a dropdown

BFL
Flux Pro 1.1 Ultra Finetune (BFL)

Your own Flux Pro 1.1 Ultra, trained by BFL — the finetune node explained

BFL/Finetune
Flux Pro Expand (BFL)

Directional outpainting the old way

BFL
Flux Pro Fill (BFL)

BFL's Fill, wired into your ComfyUI graph — inpainting and outpainting without touching VRAM

BFL
Flux Pro Fill Finetune (BFL)

Inpainting with a model that learned your style — Flux Pro Fill Finetune

BFL/Finetune
Flux Video Edit (BFL)

Type a sentence, get your clip back changed

BFL/Flux3
Flux Video Upscale (BFL)

1.5–3× on a clip without renting a GPU

BFL/Flux3
Flux Virtual Try-On (BFL)

Dress a person in a garment they never wore, from two photos

BFL
Flux Virtual Try-On v2 (BFL)

Flux VTO v2 over BFL's API

BFL
Image to Base64 (BFL)

IMAGE in, base64 string out

BFL/Utils
Video to Base64 (BFL)

VIDEO in, base64 MP4 out

BFL/Utils
Readme

ComfyUI-FLUX-BFL-API

Custom nodes for integrating Flux models with the BFL API.

Installation

Option 1: Install via Custom Nodes Manager

  1. Open the Custom Nodes Manager.
  2. Search for "ComfyUI-FLUX-BFL-API".
  3. Select the package and follow the installation instructions.

Option 2: Manual Installation

  1. Clone the repository:

    cd custom_nodes
    git clone https://github.com/gelasdev/ComfyUI-FLUX-BFL-API.git
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Get your BFL API key from api.bfl.ai.

  4. Add your API key to the config.ini file:

    [API]
    X_KEY = YOUR_API_KEY
    BASE_URL = https://api.bfl.ai/v1/
    

Configuration

You can either use config.ini for a global API key, or connect a Flux Config (BFL) node directly to any generation node to override the key, base URL, and region per-node. If no config node is connected, config.ini is used automatically.

How results are polled

Every BFL request is asynchronous: the node submits the job, then polls until the result is ready.

  • The submit response contains a polling_url, and the node polls that URL. BFL requires this because it points at the region that holds your task (Flux 3 Image, for example, returns a regional one).
  • Only when a response has no polling_url does the node fall back to building <base_url>get_result?id=<task_id> itself, with the base URL from config.ini or the Flux Config (BFL) node.
  • Polls run every 5 s: up to 40 attempts (~200 s) for image nodes, 120 for Flux 3 Image (4k can take several minutes) and 240 for the video nodes. A terminal status (Error, Request Moderated, Content Moderated) stops polling at once, even when BFL reports it as HTTP 503, and the node returns a black placeholder so the workflow keeps running.
  • Every poll is logged in the ComfyUI console as [BFL] Poll attempt … | GET <url>, so you can see which URL was used.

Nodes

Generation

| Node | Description | |---|---| | Flux 3 Image (BFL) | Text-to-image and editing with FLUX 3 in one node — up to 10 references (image_1…image_10 are "Image 1"…"Image 10" in the prompt), bounding boxes as a JSON list at the end of the prompt, 768sq to 4k output (flux-3-image) | | Flux 3 Video T2V (BFL) | Text-to-video with FLUX 3 Video (up to 20 s, with audio) | | Flux 3 Video I2V (BFL) | Image-to-video — feed keyframes from the Flux 3 Keyframes node or a single image | | Flux 3 Video V2V (BFL) | Video continuation from an existing MP4 (URL or base64), up to 15 s | | Flux Video Edit (BFL) | Edit an existing clip with a prompt — remove / add / replace objects, restyle, change dialogue; up to 15 s, delivered at 720p (flux-tools/video-edit-v1) | | Flux Video Upscale (BFL) | 1.5×–3× video super-resolution toward 4K, precise or creative mode; up to 20 s and 2560×1440 in (flux-tools/video-upscale-v1) | | Flux Pro 1.1 (BFL) | Text-to-image with Flux Pro 1.1 | | Flux Pro 1.1 Ultra (BFL) | High-resolution text-to-image | | Flux Dev (BFL) | Text-to-image with Flux Dev | | Flux Pro Fill (BFL) | Inpainting / outpainting | | Flux Pro Expand (BFL) | Outpainting with directional padding | | Flux Erase (BFL) | Object removal via binary mask (flux-tools/erase-v1) | | Flux Outpaint (BFL) | Image extension via target canvas + reference offsets (flux-tools/outpainting-v1) | | Flux Deblur (BFL) | Sharpen a blurry image while preserving the scene — no prompt or mask, up to 4 MP (flux-tools/deblur-v1) | | Flux Virtual Try-On (BFL) | Virtual try-on — dress a person image in a garment image (flux-tools/vto-v1) | | Flux Virtual Try-On v2 (BFL) | Virtual try-on v2 — sharper face preservation, inputs up to 4 MP (flux-tools/vto-v2) | | Flux Kontext Pro (BFL) | Image editing with context (up to 4 images) | | Flux Kontext Max (BFL) | Image editing with context, max quality | | Flux 2 Max (BFL) | Flux 2 Max generation | | Flux 2 Pro (BFL) | Flux 2 Pro generation | | Flux 2 Pro Preview (BFL) | Flux 2 Pro preview (latest advances) | | Flux 2 Flex (BFL) | Flux 2 Flex generation | | Flux 2 Klein 9B (BFL) | Flux 2 Klein 9B generation | | Flux 2 Klein 9B Preview (BFL) | Flux 2 Klein 9B preview (latest advances) | | Flux 2 Klein 4B (BFL) | Flux 2 Klein 4B generation |

The Flux 3 Video nodes output ComfyUI's native VIDEO type — connect them to the built-in Save Video / preview nodes (requires ComfyUI ≥ 0.3.30).

Finetune

| Node | Description | |---|---| | Flux Pro Fill Finetune (BFL) | Inpainting with a finetuned model | | Flux Pro 1.1 Ultra Finetune (BFL) | Ultra generation with a finetuned model | | Flux Finetune Status (BFL) | Check the status of a finetune job | | Flux My Finetunes (BFL) | List all your finetunes | | Flux Finetune Details (BFL) | Get details of a specific finetune | | Flux Delete Finetune (BFL) | Delete a finetune |

Config

| Node | Description | |---|---| | Flux Config (BFL) | Override API key, base URL and region per-node | | Flux Credits (BFL) | Check your remaining BFL API credits |

Utils

| Node | Description | |---|---| | Image to Base64 (BFL) | Convert a ComfyUI IMAGE to base64 — choose jpeg (default) or png (lossless, recommended for masks) | | Flux 3 Keyframes (BFL) | Combine up to 10 images (start, 8 middles, end) into the keyframes string for Flux 3 Video I2V — empty sockets are skipped; timing: even spreads them across the clip, timing: custom pins start at 0, middles at their time_N widgets and the end image at end_time (= clip length with duration: auto) | | Video to Base64 (BFL) | Convert a ComfyUI VIDEO (LoadVideo output or a Flux 3 Video result) to a base64 MP4 string — feed it into Flux 3 Video V2V's start_video, Flux Video Edit's video or Flux Video Upscale's input_video |

Workflow

Example workflows are available in the workflows folder.

Changelog

See CHANGELOG.md.

Contributors

Example

image image