ComfyUI custom nodes for FluxFlow text-to-image generation
Project description
FluxFlow ComfyUI
ComfyUI custom nodes for FluxFlow text-to-image generation.
🚧 Checkpoint Availability
Training In Progress: FluxFlow model checkpoints are currently being trained and are not yet available for download.
Status: The ComfyUI nodes are fully implemented and tested, but require trained FluxFlow checkpoints to generate images.
When Available: Trained checkpoints will be published to MODEL_ZOO.md upon completion of training validation. You will then be able to load them using the FluxFlowModelLoader node.
For Developers: You can use this plugin with your own trained FluxFlow checkpoints if you're conducting custom training experiments.
Installation
Production Install (ComfyUI Users)
Recommended for ComfyUI users: Clone directly into ComfyUI's custom_nodes directory for automatic discovery:
cd ComfyUI/custom_nodes
git clone https://github.com/danny-mio/fluxflow-comfyui.git
cd fluxflow-comfyui
pip install -e .
This method requires no additional symlink setup.
Production Install (via PyPI)
For advanced users who want to manage the package separately:
pip install comfyui-fluxflow
What gets installed:
comfyui-fluxflow- ComfyUI custom nodes for FluxFlowfluxflowcore package (automatically installed as dependency)- Note: Does NOT include training capabilities. Only inference/generation.
Package available on PyPI: comfyui-fluxflow v0.8.0
Additional Setup Required: You must symlink the package into ComfyUI's custom_nodes directory:
# Find where comfyui-fluxflow was installed
PACKAGE_PATH=$(python -c "import comfyui_fluxflow; print(comfyui_fluxflow.__path__[0])")
# Create symlink in ComfyUI's custom_nodes directory
ln -s "$PACKAGE_PATH" ~/ComfyUI/custom_nodes/comfyui_fluxflow
Adjust the ~/ComfyUI path to match your ComfyUI installation location.
Development Install
git clone https://github.com/danny-mio/fluxflow-comfyui.git
cd fluxflow-comfyui
pip install -e ".[dev]"
Features
- Model Loader: Load FluxFlow checkpoints with auto-configuration
- Text Encoding: BERT-based text encoding for prompts
- Classifier-Free Guidance (CFG): Improved prompt adherence with guidance scaling
- Negative Prompts: Support for negative text conditioning
- Sampling: Multiple sampling algorithms (Euler, DPM++, DDIM, etc.)
- VAE Operations: Encode/decode latents
- Latent Generation: Create empty latents at various resolutions
Available Nodes
FluxFlowModelLoader
Load FluxFlow model checkpoints (.safetensors or .pth files).
v0.8.0 model detection: The loader automatically detects v0.8.0 pillar-attention checkpoints (identified by pillar_cross_attn or film_p0 keys in the state dict). When a v0.8.0 checkpoint is detected, the loader returns a clear error directing you to use versioned loading via load_versioned_checkpoint() instead of the legacy loader. This prevents silent architecture mismatches.
FluxFlowTextEncode
Encode text prompts using DistilBERT.
FluxFlowTextEncodeNegative
Encode negative text prompts for Classifier-Free Guidance (CFG).
FluxFlowSampler
Sample from the diffusion model with 14 schedulers:
- Euler, Euler Ancestral
- DPM++ 2M, DPM++ 2M Karras
- DPM++ SDE, DPM++ SDE Karras
- DDIM, DDPM
- LCM (Latent Consistency Model)
- And more...
FluxFlowVAEEncode / FluxFlowVAEDecode
Encode images to latents and decode latents to images.
FluxFlowEmptyLatent
Generate empty latent tensors at specified dimensions.
Quick Start
- Load a FluxFlow model using FluxFlowModelLoader
- Encode your prompt with FluxFlowTextEncode
- Create empty latents with FluxFlowEmptyLatent
- Generate with FluxFlowSampler
- Decode latents with FluxFlowVAEDecode
Example Workflows
Basic Workflow (No CFG)
[FluxFlowModelLoader] → model
[FluxFlowTextEncode] → conditioning
[FluxFlowEmptyLatent] → latent
[FluxFlowSampler] (model + conditioning + latent) → sampled_latent
[FluxFlowVAEDecode] (model + sampled_latent) → image
CFG Workflow (Recommended)
[FluxFlowModelLoader] → model
[FluxFlowTextEncode] (positive prompt) → conditioning
[FluxFlowEmptyLatent] → latent
[FluxFlowSampler] (model + conditioning + latent + use_cfg=True + guidance_scale=5.0) → sampled_latent
[FluxFlowVAEDecode] (model + sampled_latent) → image
Advanced CFG with Negative Prompt
[FluxFlowModelLoader] → model
[FluxFlowTextEncode] (positive prompt) → conditioning
[FluxFlowTextEncodeNegative] (negative prompt) → negative_conditioning
[FluxFlowEmptyLatent] → latent
[FluxFlowSampler] (model + conditioning + negative_conditioning + latent + use_cfg=True + guidance_scale=5.0) → sampled_latent
[FluxFlowVAEDecode] (model + sampled_latent) → image
Classifier-Free Guidance (CFG)
FluxFlow supports CFG for improved prompt adherence and higher quality outputs.
How CFG Works
CFG performs two forward passes during sampling:
- Conditional pass: Using your positive prompt
- Unconditional pass: Using null/negative embeddings
The final prediction is guided by: v_guided = v_uncond + guidance_scale * (v_cond - v_uncond)
Using CFG
Basic CFG (recommended for most use cases):
- Load a FluxFlow checkpoint trained with CFG support
- Encode your positive prompt with
FluxFlowTextEncode - In
FluxFlowSampler:- Set
use_cfgtoTrue - Set
guidance_scalebetween 1.0-15.0 (recommended: 3.0-7.0) - Leave
negative_conditioningempty (uses null embeddings)
- Set
Advanced CFG with Negative Prompts:
- Encode positive prompt with
FluxFlowTextEncode - Encode negative prompt with
FluxFlowTextEncodeNegative - Connect both to
FluxFlowSampler - Set
use_cfg=Trueand adjustguidance_scale
Guidance Scale Guidelines
Recommended range: 3.0–7.0. At 1.0, guidance has no amplification effect (standard conditional generation). Above 7.0 may oversaturate or reduce diversity. Higher values increase computation (2x forward passes per step). See fluxflow-core CFG documentation for full guidance.
CFG Performance
- Memory: CFG requires ~2x VRAM due to dual forward passes
- Speed: CFG sampling takes ~2x longer than standard sampling
- Quality: Improves prompt adherence and output coherence
- Compatibility: Requires checkpoints trained with CFG dropout
Package Contents
comfyui_fluxflow.nodes- Custom node implementationscomfyui_fluxflow.schedulers- Sampling scheduler implementationscomfyui_fluxflow.web- JavaScript extensions for ComfyUI UI
Links
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file comfyui_fluxflow-0.8.0.tar.gz.
File metadata
- Download URL: comfyui_fluxflow-0.8.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed4271226ea3450ac531d57c9017a99fedf4526fac1e1932fa00eaf25686b8a7
|
|
| MD5 |
c867f885208f5faea89b2f5e78a19b78
|
|
| BLAKE2b-256 |
d0d44837cf68b85cfb55b0d9f34c9f53cae313e0565ee3f42ba59e4dc6d64971
|
File details
Details for the file comfyui_fluxflow-0.8.0-py3-none-any.whl.
File metadata
- Download URL: comfyui_fluxflow-0.8.0-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
641f3833b256bc30e3304fc581921e2151cec577f2f0d2e1ecfd1a46686412c5
|
|
| MD5 |
3d14d3f203daac9956d209a0bbf8f09e
|
|
| BLAKE2b-256 |
068959d2bb3763970109a8d47b1a3143ac8ee3e1fdd3f8e22f8d36a5f503706e
|