Nodes/ComfyUI-UtilsCollection/Text Encode with Flux2 dev System Prompt (Scaled Bias) (Legacy)
ComfyUI Node

Text Encode with Flux2 dev System Prompt (Scaled Bias) (Legacy)

`<cat=1.5>`

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Text Encode with Flux2 dev System Prompt (Scaled Bias) (Legacy)
  • clip
  • CONDITIONING
prompt
system_prompt

Here's the frustration this node exists to fix: Flux 2 dev's text encoder is an LLM, and LLM encoders throw away (word:1.3) - the classic emphasis syntax doesn't survive tokenization, it just becomes punctuation in the prompt. But if you've ever wanted to nudge one concept harder in an edit, this is the replacement: write <word=1.5> in your prompt, and the node scales that word's token embeddings directly. Same intent as the old weight syntax, different mechanism, and it actually works on Flux 2.

The scaled-bias mechanic

Type your prompt with bias tags inline - a portrait of <woman=1.4> in rain, <reflection=1.2> - and the node splits the text on those tags, measures the token count of each tagged phrase in the model's tokenizer, encodes the clean prompt through the proper Flux 2 dev template (system message wrapped in [SYSTEM_PROMPT]…[/SYSTEM_PROMPT][INST]…[/INST]), then multiplies the embedding vectors of exactly those token positions by your strength value. The pooled output is deliberately left alone, because local token weights don't define a global pooled weight.

Two practical facts come out of that design. Strength values around 1.0–1.5 are the sane range, just like the old (word:1.3) sweet spot - above ~1.5 things start oversaturating. And because it's applied to token embeddings, it survives the LLM encoder that would have silently discarded parentheses-and-colon syntax. That's the whole point.

The inputs

  • clip - Flux 2 dev's Mistral-class text encoder.
  • prompt - your request, bias tags welcome.
  • system_prompt - the model-behavior instructions, wrapped in the template; leave empty for a plain encode. The pack's SystemMessagePresets node drops in well here.

Output is CONDITIONING, straight to the sampler.

When to reach for it

If you're already using the plain TextEncodeFlux2SystemPrompt, this is the same node plus the bias parser - you lose nothing by using it, since text without any <tag=strength> pattern encodes identically (the parser is a no-op then). So the real question is whether you'll use the syntax. For edit workflows where one element needs weighting - "the face matters more than the jacket" - a <face=1.3> is a much finer lever than rewriting the whole prompt.

Where people get burned

  • The tag must match tokenizer reality. <<bunny=1.5>> or malformed tags just stay in the text as characters; only the exact <name=number> pattern is parsed.
  • It scales token embeddings, not attention - so very high strengths produce oversaturated embeddings rather than clean "louder" emphasis. Stay under ~1.5.
  • Same clip caveat as the plain node: this is Flux 2 dev's template, don't feed it a different model's encoder.

Installing it

Ships in silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager: search ComfyUI-UtilsCollection, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
cd ComfyUI-UtilsCollection
pip install -r requirements.txt   # opencv-python, typing-extensions

Restart. No model downloads for the node. Legacy alias of UC_ScaledBiasTextEncodeFlux2SystemPrompt, identical behavior.

Categoryadvanced/conditioning

Inputs (3)

NameTypeDefaultDescription
clipCLIP
promptSTRING
system_promptSTRING

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING