Nodes/ComfyUI-NS-Util/NS Dual Encoder Schedule
ComfyUI Node

NS Dual Encoder Schedule

Sweep the content/style balance as the image develops

By NakamuraShippo·Created about a year ago·Updated 4 months ago· 5
NS Dual Encoder Schedule
  • conditioning
  • CONDITIONING
start_scale_L_content0.70
end_scale_L_content1.30
start_scale_G_style1.30
end_scale_G_style0.70
schedule_start0.00
schedule_end0.80
segments5
normalizedisable
interpolation

NS Dual Encoder Schedule takes the pack's content/style separation idea and adds time. Where NS-DualEncoderGuidanceScale gives you two fixed knobs for SDXL's ViT-L (content) and ViT-bigG (style) conditioning halves, this node ramps both scales as sampling progresses - content can start weak and finish strong, style can start loud and fade, and the balance shifts smoothly through the run instead of staying frozen.

Why bother? Diffusion makes its compositional decisions early and its polish decisions late. The first ~20% of a run is where subject and layout get locked; the last stretch is where style, lighting and texture get refined. A schedule lets you match the conditioning to that: lean on the content encoder while the scene is being laid out, then ease the style encoder in as the details settle. That's the theory, and it's the same timing intuition behind the pack's refiner schedule - just applied to the base model's two encoders rather than the refiner's single one.

How it works

Same trick as the pack's other schedule node, worth internalizing because it's idiomatic ComfyUI: instead of returning one conditioning entry, it returns segments of them (default 5, up to 20), each tagged with start_percent/end_percent so the sampler knows which timesteps it covers. Each segment has its L and G chunks scaled by the interpolated values of:

  • start_scale_L_contentend_scale_L_content
  • start_scale_G_styleend_scale_G_style

The defaults encode a sensible arc: content scale climbs 0.7 → 1.3 while style scale falls 1.3 → 0.7. Read that a second time - the author's default is a swap: heavy style early (compositional mood), heavy content late (subject fidelity as it sharpens). It's a deliberately opinionated starting point. The schedule spans 0.0 → 0.8 by default, with the tooltip noting base models usually run to 0.8 (that's where the refiner or hires pass would take over).

interpolation offers linear or cosine (cosine eases the ramp at both ends), and normalize behaves like the static node - enable it to change only the L/G ratio, not total magnitude.

Inputs and output

  • conditioning - base-model (2048-dim) SDXL conditioning.
  • start/end_scale_L_content, start/end_scale_G_style - the four endpoints of the two ramps.
  • schedule_start / schedule_end (0–1), segments (2–20), interpolation, normalize.

Output is a multi-segment CONDITIONING for the KSampler's positive (or negative) input. Note it doesn't touch the model or sampler - pure conditioning surgery.

Gotchas

If schedule_start >= schedule_end you get a silent no-op - the conditioning passes through unchanged, no error. Watch the order of the two ramps: if you're not careful you can schedule content down and style up and get the exact opposite of what you intended, because there's no validation on which of the four endpoints is bigger. And, as with all these NS conditioning nodes, it's strictly SDXL-family - meaningless on the flow-matching models that took over in 2026.

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 downloads, light dependencies.

The honest take

The swap default (style-heavy → content-heavy) is the kind of opinionated, evidence-based default that makes a niche node worth keeping around. Is it for everyone? No - if you're not already using content/style separation, this adds a layer of tuning you probably don't need. But if you've been fighting "my composition drifts but raising CFG overstyles it," this is the missing control, and the schedule is genuinely the right shape for it.

CategoryNS/Conditioning

Inputs (10)

NameTypeDefaultDescription
conditioningCONDITIONING
start_scale_L_contentFLOAT0.700.1–2ViT-L (content) scale at schedule start
end_scale_L_contentFLOAT1.300.1–2ViT-L (content) scale at schedule end
start_scale_G_styleFLOAT1.300.1–2ViT-bigG (style) scale at schedule start
end_scale_G_styleFLOAT0.700.1–2ViT-bigG (style) scale at schedule end
schedule_startFLOAT0.000–1Schedule range start (0.0=sampling start)
schedule_endFLOAT0.800–1Schedule range end. Base は通常 0.8 まで。
segmentsINT52–20Number of scheduling segments
normalizeCOMBOdisable2 options: disable, enable
interpolationCOMBO2 options: linear, cosine

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING