Nodes/ComfyUI Prepack/đź’€Prepack Ksampler
ComfyUI Node

đź’€Prepack Ksampler

Sample and decode in one node — the KSampler that hands you a finished image

By S4MUEL-404·Created 12 months ago·Updated 10 months ago· 2
đź’€Prepack Ksampler
  • model
  • positive
  • negative
  • vae
  • latent_image
  • image
  • info
â—„seed0â–ş
â—„steps20â–ş
â—„cfg8.0â–ş
â—„sampler_nameâ–ľâ–ş
â—„schedulerâ–ľâ–ş
â—„denoise1.00â–ş

The vanilla ComfyUI path to a finished image is: KSampler → VAEDecode → Save/Preview. Three nodes, and the KSampler alone has eleven inputs. The 💀Prepack Ksampler collapses that into one node: it runs the sampling and decodes the result with the VAE internally, then hands you a ready-to-preview IMAGE - plus a handy info string summarizing what it just did.

For a beginner this is genuinely the friendlier starting point, because it removes two decisions (where does the VAE go? which output is the image?) from your first workflow. It's also the node I'd reach for when I want a compact, legible sampling section - the tradeoff being that you give up the in-between latent that the two-node version exposes.

How it works

Under the hood it's a faithful reimplementation of native KSampler using ComfyUI's own comfy.sample machinery, with the VAE decode folded into the same sample_and_decode call. The inputs mirror the native sampler exactly: model, positive, negative, latent_image, then the settings - seed, steps, cfg, sampler_name (44 samplers), scheduler (9 schedulers), and denoise.

The one extra required input is vae - because this node decodes internally, it needs the VAE wired in alongside the model. That's the price of the convenience: one more wire, in exchange for never having to place a VAEDecode node again.

The inputs that matter most for a beginner:

  • cfg - the guidance scale. On SD 1.5/SDXL families, 5–9 is the classic band and 7–8 is the common default. Just know that on distilled/Turbo-class models, CFG wants to be ~1 and the rules change entirely.
  • denoise - 1.0 is full denoise (txt2img); below 1.0 is img2img/partial redraw strength. The tooltip spells it out.
  • sampler_name / scheduler - the standard pick is euler + normal for starting out; the scheduler choices include karras if you want the sharper noise schedule.

The two outputs: image (the decoded IMAGE tensor, ready for preview or a save node) and info, a STRING that records the latent size, seed, steps, cfg, sampler, scheduler, and denoise used. Wire info into a text display and you've got a self-documenting run - you can see exactly what settings produced an image without digging through the workflow.

Where people get burned

The big one: you don't get the latent back. If you want a second pass on the same latent (upscale-then-resample, or an img2img chain), this node can't feed it - it decodes to image, full stop. Use the pack's PrepackKsamplerAdvanced for that, which returns the latent and matches the native advanced sampler.

Also, the info string reports the output size by multiplying latent dimensions by 8, which is correct for standard models but wrong for models with a different latent scale factor - a cosmetic issue in the log, not in the image itself.

Installing it

It ships in the Prepack pack:

cd ComfyUI/custom_nodes
git clone https://github.com/S4MUEL-404/ComfyUI-Prepack.git
pip install -r ComfyUI-Prepack/requirements.txt

Or search "Prepack" in ComfyUI Manager. Dependencies: PyTorch, NumPy, Pillow - all standard. Restart, find it under đź’€Prepack. No models to download.

If you get an "empty latent" style error, check that the latent is actually wired and populated - and remember this node needs vae connected, which the native sampler doesn't. Missing VAE is the #1 new-user error with this specific node.

Categoryđź’€Prepack

Inputs (11)

NameTypeDefaultDescription
modelMODELThe model used for denoising the input latent.
positiveCONDITIONINGPositive conditioning (CFG target).
negativeCONDITIONINGNegative conditioning (CFG target to avoid).
vaeVAEThe VAE model used for decoding the latent to image.
latent_imageLATENTThe input latent to denoise (from VAE Encode or Empty Latent Image).
seedINT00–18446744073709550000The random seed used for creating the noise.
stepsINT201–10000The number of steps used in the denoising process.
cfgFLOAT8.00–100The Classifier-Free Guidance scale.
sampler_nameCOMBOThe algorithm used when sampling.
schedulerCOMBOThe noise schedule applied during sampling.
denoiseFLOAT1.000–1Relative denoising strength: 1.0 = full denoise; <1.0 = partial denoise (img2img).

Outputs (2)

NameTypeDescription
imageIMAGEDecoded image tensor (NCHW, float32, range 0..1).
infoSTRINGSampling process information including model, prompts, parameters, and status.