Nodes/antrobots ComfyUI Nodepack/KSampler with Pipes
ComfyUI Node

KSampler with Pipes

KSampler with Pipes

By antrobot1234·Created 3 years ago·Updated about a year ago· 28
KSampler with Pipes
  • base_pipe
  • refine_pipe
  • mask
  • image
  • image_out
total_steps20
refine_step10
base_denoise1.00
refine_denoise1.00
seed0
cfg8.0
sampler_name
scheduler
use_imagefalse

This is the KSampler with Refiner node, but fed by pipes instead of a dozen loose wires. Same base-then-refiner behavior - generate on one model, switch to another partway through - except the model, VAE, and conditioning for each stage arrive bundled in a single BASIC_PIPE connection. If you've ever looked at the standard refiner node's wall of inputs and winced, this is the tidy version.

Why you'd reach for it

Two full sets of model + VAE + positive + negative is a lot of wires, and a two-stage sampler needs exactly that. A BASIC_PIPE collapses each of those bundles into one wire. This is the same "carry a bundle of connections down a single cable" idea that Impact Pack introduced with BASIC_PIPE and that rgthree's Context nodes popularized - it's the standard answer to a graph that's turning into spaghetti. refine_pipe speaks that dialect, so if you're already building with pipes, this drops in cleanly.

The other convenience: it hands you back a finished image, not a latent. It VAE-decodes internally, so you don't have to remember which of the two VAEs to decode with - a real footgun in the loose-wire refiner. And the optional image + use_image inputs let you feed a source image for an img2img-style refine.

How it works

It reads model, VAE, and conditioning out of base_pipe, samples from step 0 to refine_step, then reads the second set out of refine_pipe and finishes the remaining steps up to total_steps. As with the loose-wire version, it re-encodes the latent between stages if the two pipes carry different VAEs. Each stage uses its own denoise.

The inputs that matter

  • base_pipe / refine_pipe - the two BASIC_PIPE bundles, each carrying model, CLIP, VAE, positive and negative conditioning for that stage. Build them with this pack's Op. To Basic Pipe or Bus Pipe, or with Impact Pack's ToBasicPipe if you have it.
  • total_steps / refine_step - total steps and where the base-to-refiner switch happens.
  • base_denoise / refine_denoise - denoise per stage. Lower the refiner's toward 0.5–0.7 so it polishes detail rather than repainting composition.
  • seed, cfg, sampler_name, scheduler - the shared sampler controls.
  • mask (optional) - sets the latent noise mask, confining the refine to a region.
  • image + use_image (optional) - feed a source image and turn use_image on to run img2img instead of starting from the pipe's latent path.

The output is a single image_out - already decoded.

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 model downloads for the node itself. If you want to build your pipes with Impact Pack's nodes rather than this pack's own pipe builders, install Impact Pack too - but it isn't required, since the pack ships its own BASIC_PIPE constructors.

Common issues

The commonest trip-up is a half-built pipe. If a stage renders nothing or errors, check that the BASIC_PIPE feeding it actually has a model, VAE, and both conditionings populated - a pipe with an empty slot fails at the stage that needs it. Preview or unpack the pipe upstream if you're unsure what's in it.

Second, the use_image toggle. If you wired an image but forgot to switch use_image on, the node ignores it and samples from its latent path instead - so your "img2img" quietly runs as a fresh generation. Turn the boolean on.

And the refiner-never-runs classic applies here too: keep refine_step below total_steps, or the second pipe never gets used.

Categoryantrobots-ComfyUI-nodepack/sampling

Inputs (13)

NameTypeDefaultDescription
total_stepsINT201–10000
refine_stepINT100–10000
base_denoiseFLOAT1.000.01–1
refine_denoiseFLOAT1.000.01–1
seedINT00–18446744073709550000The random seed used for creating the noise.
cfgFLOAT8.00–100The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality.
sampler_nameCOMBOThe algorithm used when sampling, this can affect the quality, speed, and style of the generated output.
schedulerCOMBOThe scheduler controls how noise is gradually removed to form the image.
base_pipeBASIC_PIPE
refine_pipeBASIC_PIPE
maskoptMASK
imageoptIMAGE
use_imageoptBOOLEANfalse

Outputs (1)

NameTypeDescription
image_outIMAGEThe denoised latent.