Nodes/ComfyUI-Apt_Preset/Stack_Ksampler_custom
ComfyUI Node

Stack_Ksampler_custom

Build Your Own Sampling Loop From Parts

By cardenluo¡Created 2 years ago¡Updated 17 days ago¡ 309
Stack_Ksampler_custom
  • noise
  • guider
  • sampler
  • sigmas
  • latent
  • ksample

Stack_Ksampler_basic and Stack_Ksampler_adv give you dropdowns - pick a sampler name, pick a scheduler name, done. Stack_Ksampler_custom throws the dropdowns out and takes the actual objects instead: a NOISE generator, a GUIDER, a SAMPLER, a SIGMAS schedule, and a LATENT, each built by its own separate node elsewhere in your graph. This is the modular version - the same pattern ComfyUI's own SamplerCustomAdvanced uses - and it's the one to reach for the moment you need something the 44-item stock sampler dropdown doesn't cover.

Inputs (all optional)

  • noise - a NOISE object, from a node like RandomNoise.
  • guider - a GUIDER object. ComfyUI's stock CFGGuider is the common case, but this is also where a PerpNeg-style or other custom guider plugs in.
  • sampler - a SAMPLER object, built by something like KSamplerSelect.
  • sigmas - a SIGMAS schedule, from a scheduler node.
  • latent - the starting LATENT.

Output: ksample, a KS_STACK object, same socket type the basic and advanced variants produce - so downstream, this slots into the same consumer node regardless of which of the three Ksampler stack nodes built it.

Why you'd want this over the dropdown versions

If you've installed a third-party sampler pack - RES4LYF is the one that comes up constantly in current ComfyUI discussion, adding dozens of samplers (explicit, fully implicit, diagonally implicit) built specifically for flow-matching models, plus schedules like its beta57 curve - those samplers and sigma schedules exist as their own nodes, not as extra entries on a stock dropdown. Stack_Ksampler_basic and Stack_Ksampler_adv only expose ComfyUI's built-in 44-sampler list; if you want to plug a RES4LYF sampler or a custom sigma curve in, Stack_Ksampler_custom is the one with sockets that accept them.

It's also the node to reach for if you're chasing a specific paper's or workflow's exact noise/guider/sampler/sigma combination rather than approximating it through named presets - everything is explicit and swappable independently.

Setting it up

All five inputs are optional, which suggests the pack's own consumer node fills in reasonable defaults for anything you leave unplugged - though the exact fallback behavior isn't documented, so don't assume an empty socket silently does the sensible thing. Build each piece with its own dedicated node (a noise node, a guider node, a sampler-select node, a scheduler node) the same way you would for ComfyUI's native SamplerCustomAdvanced, then wire all four plus your starting latent in here.

Install

ComfyUI Manager: search "ComfyUI-Apt_Preset," install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart. The install.bat dependency installer is Windows-only - on Linux or a cloud box, read what it lists and pip-install those packages, or let ComfyUI Manager's "install missing nodes" flow handle it. If you're specifically after RES4LYF's samplers to plug in here, that's a separate node pack you'll need to install on top of Apt_Preset.

Troubleshooting

Leaving a socket disconnected and getting an unexpected result is the most likely failure mode here - since nothing is required, it's easy to forget one input and get a default you didn't intend rather than an error.

This pack has documented import failures independent of any single node - a comfyui subreddit thread shows (IMPORT FAILED): ...ComfyUI-Apt_Preset for someone loading a workflow that used it. ComfyUI Manager's "install missing custom nodes," or manually re-cloning the repo and restarting, fixed it there.

CategoryApt_Preset/stack/😺backup/ksample

Inputs (5)

NameTypeDefaultDescription
noiseoptNOISE—
guideroptGUIDER—
sampleroptSAMPLER—
sigmasoptSIGMAS—
latentoptLATENT—

Outputs (1)

NameTypeDescription
ksampleKS_STACK—