NS Dual Encoder Guidance Scale
Scale the content encoder and the style encoder separately
- conditioning
- CONDITIONING
SDXL is the last widely-used architecture that conditions on two text encoders at once, and that's a gift most people never open. The first 768 dimensions of its conditioning come from CLIP ViT-L - which tends to carry what you said, the subject and composition - and the next 1280 from OpenCLIP ViT-bigG - which tends to carry how it's said, the aesthetics, lighting, and style. NS Dual Encoder Guidance Scale gives you two separate knobs for those two halves of the same conditioning vector. Content up, style down, independently.
Why would you want that? Because prompt-vs-style struggles are usually both encoders fighting over one CFG setting. Your subject drifts, so you raise CFG, and now the image is overcooked and stylized. A node like this lets you keep overall guidance where it is and just lean harder on the content half - or, the reverse, cool down the bigG half if your prompt is making things too "paintery" for the composition you wanted. It's a precision instrument for the single most common SDXL tuning complaint.
How it works
The mechanism is embarrassingly direct, which is why it works. SDXL base conditioning is a ~2048-dim tensor: dims 0–768 are the ViT-L (content) embedding, dims 768–2048 are the ViT-bigG (style) embedding. This node slices those two chunks, multiplies each by its own scale (scale_L_content and scale_G_style, both 0.1–2.0, default 1.0), and puts the tensor back together.
The normalize toggle is the one decision that matters. Disabled (default) scales each half independently - the total signal strength changes too. Enabled re-normalizes the first 2048 dims after scaling, so you change only the ratio between content and style while keeping overall magnitude constant. The author's tooltip says it plainly: normalize is "effective when you want to change only the L/G ratio."
If both scales are 1.0, the node returns the conditioning untouched - a zero-cost passthrough, no pointless tensor cloning.
Inputs and output
- conditioning - base-model conditioning (the 2048-dim kind, from a normal SDXL text encode).
- scale_L_content - content/subject weight.
- scale_G_style - style/aesthetic weight.
- normalize - disable/enable.
Output is a single CONDITIONING with the same shape, ready to wire into the same KSampler positive/negative inputs it came from. It works on negative conditioning too, which is genuinely useful: scale down the style half of your negative prompt to stop it from dragging the whole image's aesthetic with it.
Gotchas
This expects base conditioning. If you feed it refiner conditioning (1280-dim, bigG only) it still works on the bigG half, but the dedicated NS-RefinerGuidanceScale is the right tool for that. And there's a warning in the code for non-2048-dim input: it prints a message and skips scaling rather than failing. That means a silently unscaled conditioning if you feed it something unexpected - check your wiring if results don't change.
Also keep the "it's an SDXL thing" frame in mind: the newer models that dominate 2026 don't work like this at all, and this node is meaningless on them. It's for the SDXL family and its fine-tunes, which still have a huge LoRA library, so it's not obsolete - just specific.
Installing it
Part of ComfyUI-NS-Util:
cd ComfyUI/custom_nodes
git clone https://github.com/NakamuraShippo/ComfyUI-NS-Util
or ComfyUI Manager → Install via Git URL with the same URL, restart. No model downloads; the pack's deps are pyyaml, watchdog, and opencv-python, none of which this node itself touches.
The honest take
This is the node I'd actually reach for out of the whole NS conditioning family - content/style separation is the rare SDXL trick that genuinely changes results rather than just shuffling numbers, and two independent knobs is exactly how you'd want to poke at it. Pair it with NS-DualEncoderTextEncode (separate content and style prompts) for the full effect. Just keep expectations calibrated: it's a scaler on a vector, a surgical tool, not a magic wand.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| scale_L_content | FLOAT | 1.000.1–2 | CLIP ViT-L (content) scale |
| scale_G_style | FLOAT | 1.000.1–2 | OpenCLIP ViT-bigG (style) scale |
| normalize | COMBO | disable | Re-normalize after scaling. L/G の比率のみ変化させたい場合に有効。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |