Text Encode with Flux2 dev System Prompt (Scaled Bias)
Talk to the Mistral inside
- clip
- CONDITIONING
Flux 2 Dev is the model almost nobody runs - 32B parameters plus a Mistral-3 vision-language text encoder, which the community summed up as "nobody could run it." But if you have the hardware, it's the quality ceiling for local editing, and its text encoder is a chat model. That means the way you structure a prompt - especially a system prompt - genuinely changes what comes out. UC_ScaledBiasTextEncodeFlux2SystemPrompt is the node that formats your prompt for that chat model correctly.
The mechanism
Flux 2 Dev's encoder expects its input wrapped in a Mistral-style instruction template: a [SYSTEM_PROMPT] section, then the user prompt inside [INST]...[/INST] markers. That's exactly what this node builds. Feed it a clip (the Flux 2 Dev CLIP from Load CLIP), your prompt, and a system_prompt, and it constructs the wrapper before encoding. The output is a standard CONDITIONING socket for the sampler.
On top of the template it runs this pack's scaled-bias encoder, which means you can emphasize individual words the way you used to with (word:1.2) - except it works on LLM encoders. Write <delicate=1.4>delicate porcelain in the prompt and the token embeddings for "delicate porcelain" get scaled by 1.4. The SD-style parenthetical syntax that worked on CLIP-era models gets read as literal text by Mistral-style tokenizers, so this is the modern replacement for that habit.
Three inputs, all text: clip, prompt (multiline), system_prompt (multiline). Leave system_prompt empty and it encodes with no system wrapper - just the scaled-bias behavior - so it's a safe drop-in for a plain text encode on Flux 2 Dev.
When you'd use it
Any Flux 2 Dev workflow where you're feeding a system prompt - which is most of them, honestly, because the model responds well to an explicit "you are a photorealistic image model" preamble. The KB's flux-2 guide notes Dev's real strengths are complex-prompt understanding and multi-reference composition, and those land better when the system prompt is actually in the right template slot instead of leaking into the user text. If you're editing with Dev on a 48GB-class card, this is the right text-encode node to reach for.
Install
Part of ComfyUI-UtilsCollection:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart, or use ComfyUI Manager (search "UtilsCollection"). No model downloads - you supply the Flux 2 Dev CLIP yourself. The pack's requirements (opencv-python, typing-extensions) auto-install.
Gotchas
This node is the Flux 2 Dev variant of a family the author marks experimental - expect API churn as it tracks Core behavior. The big one to avoid is template mismatch: don't wire a Klein or Z-Image CLIP into this node; each variant in this family wraps a different model's template, and the wrong wrapper produces garbage conditioning. And the standing pack note: UtilsCollection re-registers some node IDs from older packs, so accept the "replace node?" prompt on load and move on.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| system_prompt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |