Nodes/ComfyUI-Flux2Klein-Enhancer/FLUX.2 Klein Detail Controller
ComfyUI Node

FLUX.2 Klein Detail Controller

Weighting FRONT/MID/END prompt sections independently

By capitan01R·Created 7 months ago·Updated 30 days ago· 551
FLUX.2 Klein Detail Controller
  • conditioning
  • CONDITIONING
front_mult1.00
mid_mult1.00
end_mult1.00
emphasis_start0
emphasis_end0
emphasis_mult1.0
preserve_original0.00
deviceauto
debugfalse

Klein has no per-word weighting, but it does have prompt structure if you build it deliberately - and this node is the payoff for doing that. Pair it with Sectioned Encoder and you get something CLIP-style workflows never had: independently adjustable strength for the subject of your prompt, the middle details, and the closing style notes, without hand-tuning individual token weights.

How it works, and why it needs a partner

On its own, this node scales three arbitrary chunks of the active token sequence - but which tokens land in which chunk depends entirely on where the data comes from. Wired after Sectioned Encoder, it reads the real, tokenizer-derived boundaries that node recorded for your FRONT/MID/END text, so front_mult actually scales the front section you wrote, not a guess. Without that metadata - if you feed it conditioning from a plain CLIP Text Encode instead - it falls back to an arbitrary 25%/50%/25% split of whatever active tokens exist. That fallback exists for graph compatibility, not because those positions have any fixed semantic role; treat it as a rough approximation, not a real section boundary.

The inputs that matter

  • conditioning - required.
  • front_mult / mid_mult / end_mult (all optional, default 1) - multipliers for each section. With Sectioned Encoder upstream, these map to the subject/action (front), clothing/scene details (mid), and lighting/rendering style (end) split the README recommends structuring prompts around.
  • emphasis_start / emphasis_end (optional) - a completely separate mechanism: a manual token-index range you can boost independent of the section boundaries. emphasis_end = 0 disables it.
  • emphasis_mult (optional, default 1) - the multiplier applied inside that custom range.
  • preserve_original (optional) - blend back toward the unmodified conditioning; 0 is full effect.
  • device and debug - as elsewhere in the pack.

Output is a single CONDITIONING.

Installing it

ComfyUI Manager: search ComfyUI-Flux2Klein-Enhancer, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/ComfyUI-Flux2Klein-Enhancer.git

No extra dependencies.

Where people get burned

The single biggest mistake is using this node without Sectioned Encoder upstream and expecting front_mult/mid_mult/end_mult to line up with any specific part of your prompt. Without the section metadata, the split is a blind 25/50/25 slice of whatever's active - it might land roughly on "subject" and "style" by coincidence, or it might not, depending on how long your prompt is. If section-based weighting matters to your workflow, build the pair: Sectioned Encoder feeding straight into this node, exactly as the pack intends.

Second, emphasis_start/emphasis_end is a genuinely separate knob from the section multipliers, not a fourth section - it operates on raw token indices you have to know ahead of time (Sectioned Encoder's string outputs are useful here for figuring out where your text of interest actually lands). It's the tool for "boost this one specific phrase" when the FRONT/MID/END split is too coarse for what you're trying to emphasize.

Categoryconditioning/flux2klein

Inputs (10)

NameTypeDefaultDescription
conditioningCONDITIONING
front_multoptFLOAT1.000–10Multiplier for the FRONT section. With Sectioned Encoder upstream this is the actual front token range; otherwise it's the first 25% of active tokens (arbitrary).
mid_multoptFLOAT1.000–10Multiplier for the MID section.
end_multoptFLOAT1.000–10Multiplier for the END section.
emphasis_startoptINT00–512Custom emphasis range start (token index).
emphasis_endoptINT00–512Custom emphasis range end (0 = disabled).
emphasis_multoptFLOAT1.00–10Multiplier applied inside [emphasis_start, emphasis_end).
preserve_originaloptFLOAT0.000–1Linear blend back the unmodified active region. 0 = full effect.
deviceoptCOMBOauto2 options: auto, cpu
debugoptBOOLEANfalse

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING