π TA Flux Guidance Gate
Flux guidance only when you're actually sampling Flux
- conditioning
- conditioning
Flux guidance and CFG look like twins and behave nothing alike. CFG runs the model twice; Flux guidance is a single scalar that leans the sampling toward the prompt, and it's essential for Flux Dev but meaningless - or actively harmful - for models that don't use it. TA Flux Guidance Gate is a conditional valve for exactly that: it injects Flux guidance into your conditioning only when the active sampler preset is a FLUX one, and passes everything through untouched otherwise.
The mechanism is refreshingly transparent. The node takes your conditioning, a guidance float (default 3.5, the canonical Flux Dev value), and a preset_info string - which is the info output from the pack's TA Sampler Preset node. At execution it checks whether that info string contains "FLUX" (case-insensitive). If yes, it stamps {"guidance": guidance} onto the conditioning via ComfyUI's own conditioning_set_values helper. If no, your conditioning comes out byte-for-byte identical. That's the whole trick, and it's exactly the right way to do it: the gate keys off the preset name rather than asking you to remember which model is loaded.
Why this matters: if you run a multi-model workflow that can sample FLUX on one run and, say, Z-Image Turbo on the next, guidance handling becomes a footgun. Slap Flux guidance onto a non-Flux model and you've injected a conditioning key the sampler doesn't expect - the kind of subtle change that shifts results without any obvious error. This gate removes the whole class of bug by making the "should I apply guidance" decision automatic. It also quietly encodes the modern reality the KB's concepts doc states plainly: CFG 1 is the default for distilled models, and guidance is a separate knob entirely. 3.5 is the safe starting point; push toward 5β8 and Flux adheres harder but starts looking plasticky.
In a full TA workflow it slots between your prompt encoder and the KSampler: Sampler Preset β Flux Guidance Gate β TA KSampler, with the preset's info output driving the gate. If the preset name contains "FLUX" (the editor's JSON is under your control, so name your presets accordingly), guidance is applied; otherwise the gate is a no-op wire.
Install. Dependency-free pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/tmode-1960/TA-ComfyUI-Nodes-Pack
or ComfyUI Manager β "TA ComfyUI Nodes Pack". Restart, and it's under TA Nodes/Sampling.
Gotchas. The detection is dumb on purpose - it's a substring check on the preset name. If you name a non-Flux preset "MYFLUXV2" it will happily apply guidance, and if you rename your FLUX preset so it loses the letters, the gate goes quiet. Also remember: without a preset connected, preset_info is empty, so the gate defaults to pass-through - safe, but you won't get guidance either. And yes, the pack's v2.x rewrite means old v1 graphs need rebuilding.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | β | |
| guidance | FLOAT | 3.50β100 | Flux Guidance scale β only applied when a FLUX preset is active. |
| preset_info | STRING | Connect the 'info' output of a TA Sampler Preset node. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | β |