🐾MiaoshouAI Flux Clip Text Encode
One node instead of two for Flux's dual encoder
- clip
- CONDITIONING
- EMPTY CONDITIONING
- t5xxl
- clip_l
- analyze
Flux runs on two text encoders at once - CLIP-L and T5-XXL - and the standard ComfyUI graph for that is two encode calls plus a separate empty-conditioning node for the negative slot KSampler insists on even though Flux doesn't really use negative prompting. This node collapses all of that into one box: one caption in, both encoders fed, and the throwaway empty conditioning handed to you for free. The author added it specifically to kill the "run mixed-mode captioning twice" workflow that Flux users were stuck with before v1.1 of this pack.
Why it exists
Flux's guidance distillation means there's no real classifier-free guidance with a negative prompt the way SDXL has it - the model was trained to hit a target guidance strength directly, and the "guidance scale" you dial in stands in for CFG. But the KSampler node still wants something plugged into its negative conditioning input, so the standard workaround is a second CLIPTextEncode fed an empty string, purely to satisfy the graph. This node ships that empty conditioning as a second output on the same node that encodes your real prompt, so you don't build it separately. If you're feeding it a caption straight from Miaoshouai Tagger's extra_mixed mode, you also skip the old two-pass dance of running the caption through CLIP-L and T5 as separate steps - this does it in one call.
The inputs and outputs that matter
Three inputs, and they're all required: clip takes the CLIP object from your dual-clip loader (the Flux-specific one - a regular SDXL CLIP loader won't work here), caption is the text itself - hand-write it or wire it in from the Tagger node's captions output - and guidance (0–100, default 3.5) is Flux's guidance scale. 3.5 is the tool default across most of the ecosystem, but it's also a genuinely contested number: a lot of community testing lands on it being too high out of the box, producing that homogenized "Fluxmaxxed" look, and dropping it to roughly 1.8–2 (skipping beautifying language in your prompt at the same time) is the common fix for more varied, less generic faces. If you're layering LoRAs, though, pushing guidance back up toward 4–4.5 tends to work better than at baseline - there's no single right number, it moves with what else is in your graph.
Five outputs come off this node. CONDITIONING is the real encoded prompt - wire it into KSampler's positive slot. EMPTY CONDITIONING is the negative-slot filler described above. t5xxl and clip_l are string outputs showing you exactly what text landed in each encoder branch - useful for debugging when your caption isn't producing what you expect, since Flux's two encoders don't always want identical input. analyze carries the caption forward in the structured format the Caption Analyzer node reads, so you can chain this node into a filter step instead of dead-ending the string here.
How to install it
Same pack as the Tagger node, so if you already have it installed for batch captioning, this node is already available under the MiaoshouAI Tagger category. If not: ComfyUI Manager, search "ComfyUI-Miaoshouai-Tagger", install, restart - or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/miaoshouai/ComfyUI-Miaoshouai-Tagger
pip install -r ComfyUI-Miaoshouai-Tagger/requirements.txt
transformers 4.38.0+ is required (shared dependency across the whole pack, not specific to this node - it doesn't run Florence-2 itself, but installs alongside the nodes that do).
Common issues & troubleshooting
Garbled or wrong-looking output despite a fine caption. Check what's plugged into clip first - this node needs the Flux dual-CLIP loader's output, not a checkpoint's bundled CLIP or an SDXL-style loader. A mismatched CLIP object is the most common reason a Flux text-encode node produces nonsense.
Faces look generic / "AI face" no matter what you prompt. That's the guidance-scale-too-high symptom the wider Flux community complains about constantly at the 3.5 default. Drop guidance toward 1.8–2 and strip beautifying adjectives from the caption before blaming the node or the model.
Negative prompting seems to do nothing. It's not this node - Flux Dev and Schnell don't run real CFG regardless of what's wired into KSampler's negative slot, which is exactly why EMPTY CONDITIONING exists as a deliberate no-op rather than a bug.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| caption | STRING | — | |
| guidance | FLOAT | 3.50–100 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |
| EMPTY CONDITIONING | CONDITIONING | — |
| t5xxl | STRING | — |
| clip_l | STRING | — |
| analyze | STRING | — |