Load Flux 2 Pipeline (SimpleTuner)
Loading Flux 2 the way SimpleTuner needs it (and why the normal loader won't work)
- pipeline
Every workflow from this pack starts here. SimpleTunerFlux2PipelineLoader (displayed as "Load Flux 2 Pipeline (SimpleTuner)") is the node that loads a Flux 2 base model using SimpleTuner's own pipeline implementation instead of ComfyUI's standard Flux stack - and that distinction is the whole point of the pack. SimpleTuner-trained Flux 2 LoRAs target fused to_qkv_mlp_proj attention layers, which standard ComfyUI Flux nodes can't apply. This loader brings in the SimpleTuner code that understands them, so the LoRA and sampler nodes downstream actually work.
What it's doing under the hood
The loader imports SimpleTuner's custom classes - Flux2Pipeline, Flux2Transformer2DModel, and AutoencoderKLFlux2 - from the submodule, then assembles the components: a Mistral-3 text encoder via transformers, FlowMatchEulerDiscreteScheduler for sampling, and the Flux 2 VAE. It can pull from Hugging Face by repo ID or from a local diffusers-style directory, and it caches aggressively: the loaded pipeline is kept in memory and keyed by model_id + dtype + device, so re-queuing a workflow with the same settings is fast, while changing any of those three forces a reload.
The inputs that matter:
- model_path - a Hugging Face repo ID (e.g.
black-forest-labs/FLUX.2-dev) or a local path to a diffusers folder. Leave empty to use the dropdown. - torch_dtype -
bfloat16(default),float16, orfloat32. Note there is no fp8 option here, which is relevant to the VRAM reality check below. - device -
auto(default),cuda, orcpu. - model_dropdown - scans
ComfyUI/models/diffusion_models,checkpoints, and a few root/home dirs for anything containing a validmodel_index.json. - use_safetensors - on by default; the loader falls back to
.binif the preferred format is missing. - hf_token - needed for gated repos like
FLUX.2-dev.
Output is the ST_FLUX2_PIPELINE object, wired into the LoRA loader.
Installing the pack
ComfyUI Manager: search "ComfyUI-SimpleTunerFlux2". Or by hand - the --recursive matters, because SimpleTuner ships as a submodule:
cd ComfyUI/custom_nodes
git clone --recursive https://github.com/flowers6421/ComfyUI-SimpleTunerFlux2.git
cd ComfyUI-SimpleTunerFlux2
./install.sh # Linux/macOS
# python install.py # Windows
This installs SimpleTuner's requirements (transformers, diffusers≥0.28, peft, accelerate) plus the pack's own, then restart ComfyUI.
Where people get burned
- The shipped example workflow points at FLUX.1-dev. True: the
workflow.jsonbundled with the pack hasblack-forest-labs/FLUX.1-devas its model path, and this node will refuse to load it. The loader readsmodel_index.jsonand raises a clear error if it detects FLUX.1's CLIP+T5 architecture instead of Flux 2's Mistral-3 encoder. This is a leftover in the pack's example, not a bug in your setup - point it at a real Flux 2 model. - "No model selected" - that's the error when
model_dropdownis onnoneandmodel_pathis empty. Fill one of them. - SimpleTuner import failures - if the console complains it can't find SimpleTuner, the submodule never got initialized. Rerun
git submodule update --init --recursiveorinstall.sh, and check theSIMPLETUNER_PATHenv var isn't pointing somewhere stale. - VRAM, and the README's ~24GB number. The README says ~24GB for Flux 2, and that's the optimistic end - realistic for a Klein-class 9B model, optimistic for the full 32B Dev whose fp8 weights alone run ~50GB. With only bf16/fp16 available here, the full Dev needs a big card. If you're on a 24GB GPU, a Klein 9B is the sane target.
- Gated downloads -
FLUX.2-devrequires accepting the license on Hugging Face and passing a token. Use thehf_tokenfield orhuggingface-cli login. Downloads land inComfyUI/models/diffusion_models/.
Flux 2 is a heavy ecosystem - the model that won benchmarks and lost the launch over hardware. If you have the card, this loader is how you get SimpleTuner's version of it into a graph.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model_path | STRING | — | |
| torch_dtype | COMBO | bfloat16 | 3 options: bfloat16, float16, float32 |
| device | COMBO | auto | 3 options: cuda, cpu, auto |
| model_dropdownopt | COMBO | none | 1 options: none |
| use_safetensorsopt | BOOLEAN | true | — |
| hf_tokenopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipeline | ST_FLUX2_PIPELINE | — |