basic_Ksampler_adv
ComfyUI's Advanced KSampler, wired for Apt_Preset's context
- context
- latent
- context
- image
If you've ever built a refiner pipeline - sample the first N steps on a base model, hand the still-noisy latent to a second sampler for the remaining steps, maybe with a different model or settings - you've used ComfyUI's stock "KSampler (Advanced)" node. basic_Ksampler_adv is that same node's field set, ported into this pack's RUN_CONTEXT pipeline: instead of wiring model/positive/negative/latent by hand into every stage, it takes and returns a context, and just exposes the staged-sampling controls on top.
How the staged sampling works
Four fields do the actual work: add_noise (enable/disable) controls whether this stage injects fresh noise or continues denoising an already-noisy latent from a previous stage. start_at_step and end_at_step define the window of the total schedule this particular node handles - a first-stage node might run steps 0 through 15, and a second-stage node picks up 15 through 20. return_with_leftover_noise (disable/enable) decides whether the output latent gets fully denoised at end_at_step or handed onward still carrying leftover noise for the next stage to finish. Get the noise/leftover-noise combination wrong between two chained instances of this node and you'll either double-denoise (mushy, over-smoothed output) or under-denoise (residual noise baked into the final image) - this is the classic advanced-sampler footgun, and it's exactly the same trap as the stock ComfyUI node, just relocated.
The inputs and outputs that matter
Required: context, add_noise, noise_seed, steps (tooltip: "0 == None," so 0 defers to the context), start_at_step, end_at_step, return_with_leftover_noise, and image_output for inline preview/save. latent is the one optional input - supply it directly, or let the context provide it. Outputs are just context and image, kept intentionally lean since this node is almost always one stage of a longer chain rather than the end of the line.
Installing it
Search "ComfyUI-Apt_Preset" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
Run install.bat on Windows (pip install -r requirements.txt on Linux/Mac), restart. No extra dependencies - this wraps ComfyUI's own advanced sampling call.
Common issues
The most common mistake here isn't specific to this pack - it's the same one people hit with the stock Advanced KSampler: mismatching end_at_step on one stage with start_at_step on the next, or leaving return_with_leftover_noise enabled on what's actually your final stage, which leaves visible noise baked into the output because nothing downstream finishes denoising it. If a two-stage refiner setup looks either oversmoothed or grainy, that pairing is the first thing to check, not the sampler or scheduler choice. Beyond that, remember steps at 0 defers to the context rather than meaning "zero steps run" - same convention as this pack's other context-aware samplers, and worth knowing before you assume the node is silently doing nothing.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| context | RUN_CONTEXT | — | |
| add_noise | COMBO | 2 options: enable, disable | |
| noise_seed | INT | 00–18446744073709550000 | — |
| steps | INT | 200–10000 | 0 == None |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 10000–10000 | — |
| return_with_leftover_noise | COMBO | 2 options: disable, enable | |
| image_output | COMBO | Hide | 4 options: Hide, Preview, Save, Hide/Save |
| latentopt | LATENT | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| context | RUN_CONTEXT | — |
| image | IMAGE | — |