Nodes/Spellcaster Nodes/Spellcaster Sampler (Auto-Config)
ComfyUI Node

Spellcaster Sampler (Auto-Config)

One sampler that already knows the right steps, CFG and scheduler for your model

By laboratoiresonore·Created 5 months ago·Updated 3 months ago· 1
Spellcaster Sampler (Auto-Config)
  • model
  • positive
  • negative
  • latent_image
  • samples
arch_keysdxl
seed0
steps_override0
cfg_override0.0
denoise1.00
sampler_overrideauto
scheduler_overrideauto

KSampler's defaults are a starting point, not a recommendation. SD 1.5 at CFG 7 and 25 steps is fine, but run that on Flux 2 Klein and you'll bake it to mush - Klein wants 4 steps and a CFG around 1.0, and it doesn't even sample the same way, needing SamplerCustomAdvanced with a CFGGuider. SpellcasterSampler is the node that remembers all of that per architecture, so you don't have to. It's the middle of the pipeline in the ComfyUI-Spellcaster pack: feed it the MODEL and conditioning from the Loader's stack, and it picks the sampling strategy for you.

How it works

Everything hinges on the arch_key string coming in from SpellcasterLoader (it also defaults to sdxl if you wire it manually). That key looks up an architecture config that carries the recommended steps, CFG, sampler, scheduler, and - crucially - which sampling pipeline to use:

  • Most models (SD 1.5, SDXL, Illustrious, ZIT, Flux Dev, Chroma) get a standard KSampler, implemented as a straight copy of ComfyUI's common_ksampler.
  • Flux 2 Klein gets SamplerCustomAdvanced with a CFGGuider, sigmas computed from the model's own sampling, and random noise - automatically. You don't build that Franken-pipeline by hand.

Defaults per architecture: SD 1.5 → 25 steps, CFG 7.0; SDXL → 30/6.5; Illustrious → 28/5.5; ZIT (turbo) → 6/2.0; Flux Dev → 25/3.5; Chroma → 25/3.0; Klein → 4/1.0; Flux Kontext → 25/3.5. These are sane out of the box, which is honestly the whole value of the node.

The inputs that matter

Required: model, positive, negative, latent_image (from the EmptyLatentImage or an encode), arch_key, and seed (with a randomize-on-generate toggle).

Optional overrides, all defaulting to "trust the architecture":

  • steps_override / cfg_override - set to 0 to use the architecture default, any positive number to override.
  • denoise - 1.0 for full generation; lower it to 0.5–0.6 for img2img.
  • sampler_override / scheduler_override - auto uses the architecture default; otherwise you get the full stock list of samplers and schedulers to pick from.

You only touch the overrides when the defaults aren't what you want. That's the design: sane defaults, manual escape hatch.

The Flux negative-prompt gotcha

The node requires a negative CONDITIONING input regardless of model. For the Flux family that's a bit of a lie in disguise - the architecture table in the README marks negative prompts as "No" for Flux Dev, Klein, Chroma and Kontext. The convention is to feed a blank conditioning (empty prompt through a CLIPTextEncode) on those; the sampler passes it through and the model ignores it. Where this really matters is distilled models like Klein and ZIT - negative-heavy prompting is a waste of tokens there, and the low default CFG keeps things sane. If you're used to SDXL's (worst quality:1.4) habits, leave them at the door when you switch the arch_key to a Flux family value.

Install

It ships in the same pack as SpellcasterLoader, so install once: ComfyUI Manager, search "Spellcaster", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/laboratoiresonore/ComfyUI-Spellcaster.git

No heavy dependencies - the pack's requirements.txt lists only huggingface_hub and zeroconf, both soft.

Where people get burned

Not reading the arch_key socket. If you leave the key as the sdxl default while actually running a Klein model, the sampler will happily apply SDXL's 30 steps / CFG 6.5 to it - wrong pipeline, wrong everything. Wire arch_key from the Loader's string output (that's exactly what it's for) rather than hard-coding it, and the sampler becomes genuinely fire-and-forget.

CategorySpellcaster

Inputs (11)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
arch_keySTRINGsdxl
seedINT00–18446744073709550000
steps_overrideoptINT00–100000 = use architecture default
cfg_overrideoptFLOAT0.00–1000 = use architecture default
denoiseoptFLOAT1.000–1
sampler_overrideoptCOMBOauto45 options: auto, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39
scheduler_overrideoptCOMBOauto10 options: auto, simple, sgm_uniform, karras, exponential, ddim_uniform, +4

Outputs (1)

NameTypeDescription
samplesLATENTThe denoised latent.