Nodes/quadmoon's ComfyUI nodes/KSamplerAdvanced - Extra Outputs
ComfyUI Node

KSamplerAdvanced - Extra Outputs

KSamplerAdvanced That Hands Back Your Model, Prompts, and Seed

By traugdor·Created 3 years ago·Updated 9 months ago· 16
KSamplerAdvanced - Extra Outputs
  • model
  • positive
  • negative
  • latent_image
  • MODEL
  • POSITIVE
  • NEGATIVE
  • SEED
  • LATENT
add_noise
noise_seed0
steps20
cfg8.0
sampler_name
scheduler
start_at_step0
end_at_step10000
return_with_leftover_noise

KSamplerAdvanced is the core node you reach for when you want to control where in the sampling you start and stop - mid-generation edits, multi-pass workflows, inpainting chains. The quadmoon version is that exact node with one addition that changes how you build graphs: it passes your model, both conditionings, and the actual seed back out alongside the sampled latent. So instead of a terminal node that ends the line, it's a node you can chain.

Why you'd reach for it

The pass-throughs are the entire pitch. In a multi-pass workflow - say, an img2img pass followed by a refinement pass - a stock KSamplerAdvanced forces you to re-wire model/positive/negative/seed from upstream again for the second sampler. This one hands them to you on the output side, so the second sampler plugs straight in and the graph stays readable. The SEED output is genuinely useful: it's the noise_seed that was actually used, which means you can lock a second pass to the same seed without hunting for the widget value.

How it works

It's a faithful copy of ComfyUI's own KSamplerAdvanced implementation - comfy.sample.sample with the same start_at_step, end_at_step, add_noise, and return_with_leftover_noise semantics - just wrapped to return five outputs instead of one. So everything you already know about the advanced sampler applies here: add_noise off for a second pass that continues from an existing latent, return_with_leftover_noise on when you're handing a partially-denoised latent to a future pass.

Inputs and outputs

The ones a beginner actually sets:

  • model, positive, negative, latent_image - the standard wiring.
  • noise_seed - the seed for this pass.
  • steps, cfg, sampler_name, scheduler - normal sampling controls.
  • start_at_step / end_at_step - the core advanced controls. For a normal run, 0 to steps. For a continuation pass, start at where the last pass stopped.
  • add_noise - enable for the first pass, disable when continuing from existing latents.
  • return_with_leftover_noise - leave disabled unless you're building a three-pass chain.

Outputs: MODEL, POSITIVE, NEGATIVE, SEED (pass-throughs) and LATENT (the sample).

Installing it

Part of "quadmoon's ComfyUI nodes". ComfyUI Manager: search the pack title or Install via GIT URL with https://github.com/traugdor/ComfyUI-quadMoons-nodes.git. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/traugdor/ComfyUI-quadMoons-nodes.git

Restart ComfyUI. No models or extra dependencies.

Common issues

Because it's a straight port, the failure modes are the same as the core node. The classic one: forgetting to disable add_noise on a continuation pass, which dumps fresh noise on top of a latent you meant to refine - you get a worse version of the first pass instead of a refinement. And if you set end_at_step below start_at_step, nothing sensible happens; keep them monotonic.

CategoryQuadmoonNodes/sampling

Inputs (13)

NameTypeDefaultDescription
modelMODEL
add_noiseCOMBO2 options: enable, disable
noise_seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
start_at_stepINT00–10000
end_at_stepINT100000–10000
return_with_leftover_noiseCOMBO2 options: disable, enable

Outputs (5)

NameTypeDescription
MODELMODEL
POSITIVECONDITIONING
NEGATIVECONDITIONING
SEEDINT
LATENTLATENT