Nodes/SAX Bridge/SAX KSampler
ComfyUI Node

SAX KSampler

The sampler that reads its own settings

By so16tm·Created 6 months ago·Updated 3 months ago· 0
SAX KSampler
  • pipe
  • PIPE_LINE
  • IMAGE
decode_vaetrue

In stock ComfyUI, the KSampler is where you set steps, CFG, sampler, scheduler, and denoise, every single time, on every node. In SAX_Bridge, that job belongs to the loader. SAX KSampler is deliberately a pass-through: you feed it a PIPE, it runs the sampler using the settings already stored in that pipe's loader_settings, and returns an updated pipe with the decoded images added. It has two inputs (pipe and decode_vae) and no sampler widgets at all. That sounds like less control. It's actually the point - one source of truth for your sampling settings, instead of five widgets you forget to keep in sync.

How it works

The node reads model, positive, latent, vae, and seed from the pipe, and pulls steps, cfg, sampler_name, scheduler, and denoise from loader_settings - the dict your SAX Loader (or Diffusion Loader) wrote when you set them. If a custom path left loader_settings missing or partial, it falls back to sensible defaults: 20 steps, CFG 8, euler/normal, denoise 1.0, seed 0. So the node always has something to run on, even if you hand it a pipe assembled by other means.

Two behaviors worth knowing:

  • If the pipe has no negative conditioning, it auto-generates one by encoding an empty string with the pipe's CLIP. You can't accidentally sample without a negative.
  • decode_vae (default True) controls whether the sampler runs VAE Decode. True gives you the IMAGE output; False leaves the latent updated and sets IMAGE to None - the "latent only" path, for when you want to chain more latent-space work (like the upscaler or a latent noise injector) before decoding once, at the end.

What comes out

Two outputs: PIPE_LINE (the pipe, now with images filled and the latent advanced) and IMAGE (the decoded image, unless decode_vae is off). Both feed the same downstream nodes - the pipe for further SAX processing, the image for preview/save.

Where it fits

The canonical chain: SAX Loader → SAX Prompt → SAX KSampler → SAX Upscaler → SAX Detailer → SAX Finisher → output. Because the settings ride in the pipe, every stage after the sampler - the upscaler's i2i pass, the detailer's redraw - inherits the same steps and CFG by default, with their steps_override/cfg_override knobs for punching in per-stage differences. If you're coming from stock ComfyUI, the swap feels weird for about ten minutes, then you never want to go back to retyping CFG into four nodes.

The one adjustment: since the loader owns the sampler settings, changing your sampler means editing the loader, not the KSampler. That's the whole design, and the SAX Debug Inspector will happily show you what loader_settings actually contains if you ever doubt it. Install is just the pack clone:

cd ComfyUI/custom_nodes
git clone https://github.com/so16tm/SAX_Bridge

Find it under SAX/Bridge/Sampler after restart.

CategorySAX/Bridge/Sampler

Inputs (2)

NameTypeDefaultDescription
pipePIPE_LINE
decode_vaeBOOLEANtrue

Outputs (2)

NameTypeDescription
PIPE_LINEPIPE_LINE
IMAGEIMAGE