Flux2模型配置器
Train on Flux 2 (dev or klein) — three files and a shift value
- model_path
Flux 2 is where Black Forest Labs' line went next - both the bigger dev and the smaller klein share the same architecture, and this pack supports training on both. Flux2ConfigNode is the node that points a run at them. The README changelog dates it to early 2026 (20260117: flux2 support), right on the heels of what the author calls the "super huge update" to the upstream diffusion-pipe project - so this is a recent addition, and a fast-following one at that.
What it does
Same family pattern: paths in, model_path config out, into GeneralConfig.model_config. Flux 2 differs from Flux 1 in that it's not a diffusers-folder setup on the training side - this node wants three discrete files, all required:
diffusion_model- the main Flux 2 weights, e.g.flux2/flux2.safetensors. The source returns an error if this is empty.vae- the VAE file, e.g.vae/vae.safetensors.text_encoder- the text encoder file, e.g.text_encoder/text_encoder.safetensors. In the emitted config this becomes atext_encodersentry taggedtype: "flux2", which is how diffusion-pipe knows which encoder family to build.shift(default 3, range 0–100) - the timestep shift. The tooltip just says "shift parameter," but this is the flux-style noise schedule offset; 3 is the shipped default for a reason. Treat it as "set once, rarely touch" unless you're deliberately experimenting.
The node is strict: all three paths must be present or you get an error dict. No silent half-configs.
What to know before you start
The KB's training notes flag the real change of the Flux-2 era: these models are trained at a higher latent depth and with a Qwen-class LLM encoder, and "Klein 9b hates small batch sizes and high LRs." Practical translation: keep your rank modest, mind your effective batch size, and don't copy SDXL-era learning rates in. The README table grants Flux 2 the full trifecta - LoRA ✅, full fine-tune ✅, fp8 ✅ - so you have options, but the LoRA path is where most people should start.
Installing the pack
Standard install for TianDongL/Diffusion_pipe_in_ComfyUI, Linux/WSL2 only:
cd ComfyUI/custom_nodes/
git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
git submodule update
pip install -r Diffusion_pipe_in_ComfyUI/requirements.txt
The README also calls for the latest dev diffusers (pip install git+https://github.com/huggingface/diffusers) - for the newest models like Flux 2, that step is effectively mandatory, and it's the first thing to check if training errors on missing attributes.
Common issues
The predictable ones: a missing required path (the node errors loudly - read the console), and the pack's WSL2 drive-letter path convention (Z:/... rather than /mnt/z/...). Less obvious: this is new enough that model-format mismatch is a real risk - grab the ComfyUI-format Flux 2 files, not a diffusers folder, since this node takes explicit file paths. And if your loss does something weird right out of the gate, revisit shift before you blame the dataset.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| diffusion_model | STRING | Flux2模型文件的完整路径(如:flux2/flux2.safetensors) | |
| vae | STRING | VAE模型文件的完整路径(如:vae/vae.safetensors) | |
| text_encoder | STRING | Text Encoder模型文件的完整路径(如:text_encoder/text_encoder.safetensors) | |
| shift | INT | 30–100 | shift参数 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model_path | model_path | — |