Nodes/ComfyUI-NS-Util/NS Refiner Guidance Scale
ComfyUI Node

NS Refiner Guidance Scale

A volume knob for the refiner's bigG conditioning

By NakamuraShippo·Created about a year ago·Updated 4 months ago· 5
NS Refiner Guidance Scale
  • conditioning
  • CONDITIONING
scale_G1.00
normalizedisable

Every so often a node is a single knob, and NS Refiner Guidance Scale is exactly that: a volume control for the OpenCLIP ViT-bigG component of an SDXL refiner's conditioning. If you're running a refiner stage at all, this is how you crank up or soften how hard the refiner's text conditioning bites.

Let's keep the context honest, because it determines whether this node matters to you. The SDXL refiner was Stability's second denoising stage, meant to add fine detail, and the community's verdict was basically "the refiner adds little, use a fine-tuned checkpoint instead." These NS refiner nodes are for the people who still run the two-stage pipeline deliberately - for consistency with an original workflow, or because they've tuned it to taste and it works. If that's you, this is a clean, predictable knob to have.

How it works

SDXL base conditioning is a 2048-dimensional vector: the first 768 dimensions come from CLIP ViT-L, and dimensions 768–2048 from OpenCLIP ViT-bigG. The refiner's conditioning is different - it's driven by the bigG encoder alone, so it's a 1280-dimensional vector. NS Refiner Guidance Scale takes a refiner conditioning input, multiplies that whole bigG vector by scale_G, and hands you back a conditioning of the same shape.

Two details in the code are worth knowing because they explain behavior you'll see:

  • If scale_G is exactly 1.0, the node is a passthrough - it doesn't bother cloning tensors. No-op inputs cost you nothing.
  • If the incoming conditioning's last dimension is under 1280, it prints a warning and skips scaling entirely. Feed it a base-model conditioning (2048-dim) and it still works on the bigG half; feed it something unexpected and it just passes through rather than crashing. It fails soft, which is friendlier than most.

The normalize toggle (disable/enable) is the one subtle decision. Disabled (default) just scales the vector, which changes both the bigG magnitude and its ratio relative to the L component. Enabled re-normalizes after scaling so only the L/G ratio shifts and the overall signal strength stays put. The dual-encoder sibling in this pack spells it out in its tooltip: enable normalize when you only want to change the ratio.

Inputs and outputs

  • conditioning - feed it the output of NS-RefinerTextEncode (or any refiner conditioning).
  • scale_G - float, 0.1 to 2.0, default 1.0. Below 1 weakens the refiner's text influence; above 1 makes it push harder. The tooltip is just "OpenCLIP ViT-bigG scale" - the knob is the feature.
  • normalize - disable/enable, default disable.

Output is a single CONDITIONING, wired straight into the refiner KSampler's positive (or negative) input in place of the unmodified conditioning.

Using it with the rest of the pack

This node is the static version of a bigger idea. The pack also ships NS-RefinerSchedule, which does the same scaling but sweeps it across the refiner's sampling range (start high, ease down, or vice versa) by splitting the conditioning into timed segments. NS-RefinerGuidanceScale is what you want when you've found the sweet spot and just want to leave a single number on the node; the Schedule is for when you want it to move.

Installing it

It's one node inside ComfyUI-NS-Util. Install via ComfyUI Manager → Install via Git URL:

https://github.com/NakamuraShippo/ComfyUI-NS-Util

or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/NakamuraShippo/ComfyUI-NS-Util

Restart ComfyUI. The pack's dependencies are light (pyyaml, watchdog, opencv-python) and there are no model downloads. If you can run a refiner, you already have everything this node needs.

The honest take

If you're not running an SDXL refiner, skip this. If you are, it's one of the least surprising nodes in the pack - a single scalar multiplied into a tensor, with a sane passthrough when it's a no-op. Set scale_G to taste, leave normalize alone until you understand why you'd want it, and move on.

CategoryNS/Conditioning

Inputs (3)

NameTypeDefaultDescription
conditioningCONDITIONING
scale_GFLOAT1.000.1–2OpenCLIP ViT-bigG scale
normalizeCOMBOdisable2 options: disable, enable

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING