Nodes/antrobots ComfyUI Nodepack/KSampler with Pipe (Advanced)
ComfyUI Node

KSampler with Pipe (Advanced)

KSampler with Pipe (Advanced)

By antrobot1234·Created 3 years ago·Updated about a year ago· 28
KSampler with Pipe (Advanced)
  • pipe
  • sampler_pipe
  • image
  • latent_opt
  • mask
  • image out
  • latent
  • vae
seed0
steps20
start_step0
last_step10000
add_noisetrue
force_full_denoisefalse
use_imagefalse
return_imagetrue

This is a full-featured sampler that takes almost everything in as pipes. Instead of a KSampler with fifteen inputs strung across your canvas, you hand it one BASIC_PIPE for the model/VAE/conditioning and one SAMPLER_PIPE for the sampler settings, plus a handful of per-run toggles. It's the "advanced" of the pack's pipe samplers - the one with the step-window and noise controls exposed - and it gives you back the image, the latent, and the VAE in one go.

Why you'd reach for it

If you build with pipes, a normal KSampler is the node that breaks the flow: everything else travels bundled, then you have to unpack model, VAE, positive, and negative just to sample, and re-bundle after. sample_pipe_advanced keeps you in pipe-world end to end. Notice what's not in its input list - there's no sampler_name, scheduler, or cfg here, because those live inside the SAMPLER_PIPE. That's the design: sampler configuration becomes a reusable bundle you wire once and reuse across multiple samplers, the same way BASIC_PIPE reuses the model stack.

The three outputs are the other selling point. You get the decoded image, the raw latent (for a further pass), and the VAE (so the next node decodes correctly) without adding separate decode/unpack nodes.

How it works

It pulls model, VAE, and conditioning from pipe, pulls the sampler configuration from sampler_pipe, and runs the sampler with the step and noise controls you set. The optional flags give it the range of the Advanced KSampler: a step window, whether to add noise, and whether to force a full denoise at the end.

The inputs that matter

  • pipe - the BASIC_PIPE with your model, CLIP, VAE, positive and negative. Build it with this pack's Op. To Basic Pipe / Bus Pipe or Impact Pack's ToBasicPipe.
  • sampler_pipe - a SAMPLER_PIPE carrying the sampler settings (sampler, scheduler, cfg and the like). This is a pack-specific bundle; you build it with the pack's sampler-pipe node, since those settings aren't exposed on this node directly.
  • seed / steps - the two core controls that are on the node.
  • image - an image input; combine with use_image to run img2img.
  • latent_opt (optional) - supply a latent to sample from instead of the image path.
  • mask (optional) - latent noise mask to confine the work.
  • start_step / last_step (optional) - the step window, for split or partial passes.
  • add_noise / force_full_denoise / return_image (optional) - the hand-off and output toggles: turn add_noise off for a continuation pass, force_full_denoise on to finish cleanly, return_image off to skip decoding if you only want the latent.

Outputs: image out, latent, vae.

Installing it

ComfyUI Manager → search antrobots ComfyUI Nodepack, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack

No downloads for the node. Impact Pack is optional (only if you'd rather build pipes with its nodes).

Common issues

The one that stops people cold is the SAMPLER_PIPE. Because this node has no sampler_name/scheduler/cfg of its own, it can't sample until it's fed a valid SAMPLER_PIPE - if you can't find where to set those, that's the missing piece: you need the pack's node that builds a sampler pipe, wired into sampler_pipe.

Second, the image-vs-latent path. If you wired an image but left use_image off, or forgot to connect latent_opt, the node won't sample from what you expected. Match the toggle to the source: use_image on for the image input, or feed latent_opt for the latent path.

Third, if you only want a latent out (say, to chain into another sampler), set return_image off to skip the decode and save a little time.

Categorymodel/sampling

Inputs (13)

NameTypeDefaultDescription
seedINT00–18446744073709550000The random seed used for creating the noise.
stepsINT201–10000The number of steps used in the denoising process.
pipeBASIC_PIPE
sampler_pipeSAMPLER_PIPE
imageIMAGE
latent_optoptLATENTlatent image to use. Only provide if you do not want to use the input image.
maskoptMASK
start_stepoptINT00–10000
last_stepoptINT100000–10000
add_noiseoptBOOLEANtrue
force_full_denoiseoptBOOLEANfalse
use_imageoptBOOLEANfalseif false, a new latent image will be created based off of the dimensions of the input image
return_imageoptBOOLEANtrueif false, the latent will not be decoded. The input image will be returned as a placeholder.

Outputs (3)

NameTypeDescription
image outIMAGEThe decoded image.
latentLATENTThe latent image.
vaeVAEThe VAE to decode the latent if desired.