Nodes/SpectrumKSampler/SpectrumKSamplerModGuidance
ComfyUI Node

SpectrumKSamplerModGuidance

A retired node name that still works

By sorryhyun·Created 4 months ago·Updated 22 days ago· 25
SpectrumKSamplerModGuidance
  • model
  • positive
  • negative
  • latent_image
  • clip
  • LATENT
seed0
steps28
cfg4.0
sampler_name
scheduler
denoise1.00
quality_tagshighres, best quality, score_7
quality_negscore_1, score_2, score_3, worst quality, lowres, old, bad hands, bad anatomy
mod_w_profilestep_i8_skip27
refresh_ratio0.00
adaptive_smc_alpha0.10
xattn_boost1.00
fsgfalse

If you searched this exact class name, you probably found it stamped inside an old saved workflow's JSON, not in ComfyUI's Add Node menu - and that's not a bug. SpectrumKSamplerModGuidance used to be its own node, "KSampler (Spectrum + Mod Guidance)". As of the pack's unified release it's gone from the menu, but the class key sticks around as a hidden alias so old workflows that reference it still load and run - it just quietly resolves to the current KSampler (Spectrum) node underneath. Same code path, same outputs, nothing broken.

So what does it actually do

Everything KSampler (Spectrum) does, because that's what it is now. It's a drop-in KSampler replacement that skips most of Anima's transformer compute per step using Chebyshev polynomial forecasting - full forward passes on "actual" steps, a cheap forecasted tail-only pass on "cached" steps - with modulation guidance folded in as an optional extra.

The schema is identical to the current node: standard KSampler inputs (model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise), plus:

  • refresh_ratio - the SEA scheduling dial that decides which steps get cached. 0 (default) is content-aware and calibrated to match the plain schedule's speed; -1 is the plain growing-window schedule with no calibration step; positive values are an explicit, faster-but-less-faithful ratio.
  • Optional clip plus quality_tags / quality_neg / mod_w_profile - the modulation guidance surface. Wire a CLIP and pick a profile (default step_i8_skip27) to steer generation toward your quality tags via a learned adapter; leave CLIP unwired and guidance is skipped with a console warning, not an error.
  • adaptive_smc_alpha - detail-recovery CFG combine, mild darkening as the tradeoff.
  • xattn_boost - a text-adherence dial for prompts the model isn't fully obeying.
  • fsg - the heavier Foresight Guidance switch, off by default, needs cfg != 1.

Output is LATENT, same as any sampler.

What to actually do about it

If you're opening an old workflow that uses this node type, do nothing - it'll load and run fine as-is. If you're building something new, don't add this one; search for KSampler (Spectrum) instead. The alias exists purely for backward compatibility, and the pack's own docs say plainly that neither SpectrumKSamplerModGuidance nor its SEA-flavored sibling appear in the add-node search anymore.

Installing it

Same pack either way - ComfyUI Manager: search SpectrumKSampler, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/sorryhyun/ComfyUI-Spectrum-KSampler

Restart. If you use modulation guidance, the ~12MB adapter auto-downloads to ComfyUI/models/anima_mod_guidance/ on first use.

Common issues & troubleshooting

"I can't find this node when I search." That's expected - it's intentionally hidden from the menu. Use KSampler (Spectrum).

Loaded an old workflow and it looks unchanged. Correct, and safe. The alias resolves to the same class that powers the current unified sampler, so behavior is preserved, not degraded.

No DCW knob here either way. Neither this alias nor the current unified sampler expose DCW - that lives on KSampler (Spectrum + Mod Guidance Advanced) only, if that's what you're after.

Categorysampling

Inputs (18)

NameTypeDefaultDescription
modelMODELThe model used for denoising the input latent.
seedINT00–18446744073709550000
stepsINT281–10000
cfgFLOAT4.00–100
sampler_nameCOMBO45 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +39
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1
quality_tagsSTRINGhighres, best quality, score_7Quality tags to steer generation toward via modulation.
quality_negSTRINGscore_1, score_2, score_3, worst quality, lowres, old, bad hands, bad anatomyQuality-negative baseline for the mod-guidance steering axis (delta = proj(quality_tags) − proj(quality_neg)). Leave EMPTY to reuse the CFG negative (legacy behavior). Set a clean counter-pole (e.g. 'worst quality, score_1') to decouple the quality axis from the broad CFG negative, which is anti-correlated with the intended quality direction. Does NOT change the CFG negative itself.
mod_w_profileCOMBOstep_i8_skip27Per-block guidance schedule preset. 'off' disables modulation guidance entirely (no adapter download, no extra hook). 'step_i8_skip27' (default) protects early tonal-DC blocks 0–7 and the final compensation block 27, applying w=3 to blocks 8–26 — best overall quality but can occasionally show minor anatomy drift on drift-prone LoRAs. 'step_i14' is the SAFE option: steers only from block 14 onward, reliably stays inside the trained manifold at the cost of a slightly less expressive result. 'uniform_w3' recovers pre-0413 behavior (not recommended — prone to pink-collapse).
refresh_ratioFLOAT0.00-1–1SEA scheduling dial. -1 = SEA off (plain growing-window schedule; accelerates from the first run, no calibration). 0 = SEA auto (match the window schedule's refresh fraction at this step count — same speed, smarter step placement). >0 = explicit refresh ratio (lower = faster, less faithful). The first run at each (resolution / steps / cfg / refresh_ratio) does a one-time full-compute calibration pass, then caches δ to the ComfyUI user dir for later runs.
adaptive_smc_alphaFLOAT0.100–1α-adaptive Sliding-Mode Control CFG gain. 0 disables (vanilla CFG combine). 0.2 = production default — k_t := α·mean(|v_cond − v_uncond|) per step keeps the bang-bang correction in-band across CFG/σ/sample (paper's fixed k=0.1 was ~14× off on Anima at CFG=4). Recovers detail (fingers, eyes, text); outputs run slightly darker. Auto-disabled when CFG=1.
xattn_boostFLOAT1.001–3Front-loaded cross-attn boost λ. 1.0 = off (exact identity). Scales every block's cross-attn residual on the conditional forward at high σ (the plan-writing window where text drive lives), strengthening weak-tag adherence and relation/attribute bindings without changing the render style. Norm-matched by default (renorm 'img' ρ0.5 — tunable on the Advanced node) so the boosted state stays on the trained norm shell instead of burning saturation. ~1.5 recommended; up to 3.0 for stubborn tags (higher λ can amplify unwanted caption tags like framing/crop priors). Boosts only actual forwards; forecast steps extrapolate from the boosted features. Composes with SMC-CFG / CFG++ / FSG / mod-guidance.
fsgBOOLEANfalseForesight Guidance toward the golden path (one switch = the validated production stack: CFG++ λ=1.5 substrate + FSG band [0.59,0.75], K=3, on the 1024 tier @ ~28 steps). Needs CFG != 1. Because CFG++ replaces the cond/uncond combine, turning this ON disables SMC-CFG (they are mutually exclusive). Adds ~3·K forwards per in-band step. Band/K/Δσ/γ and the CFG++ λ are tunable on the Advanced node; re-tune if you change steps/resolution (the band moves).
clipoptCLIPCLIP encoder for encoding positive quality tags.

Outputs (1)

NameTypeDescription
LATENTLATENT