Nodes/SP-Nodes/SP_KSampler
ComfyUI Node

SP_KSampler

The pipe-based KSampler that also decodes and previews

By bananasss00·Created 2 years ago·Updated 5 days ago· 20
SP_KSampler
  • sp_pipe
  • model
  • positive
  • negative
  • latent_image
  • image
  • sampler
  • sigmas
  • SP_PIPE
  • SP_PIPE_SRC
  • LATENT
  • IMAGE
seed0
steps20
cfg8.0
sampler_name
schedulerbeta
denoise1.00
inject_noise0.00
tile_size0
vae_decodetrue
previewtrue

A standard ComfyUI workflow wires model, positive conditioning, negative conditioning, and a latent into a KSampler, then wires the latent output into a separate VAE Decode, then into a Preview Image. SP_KSampler collapses that chain into one node built around a "pipe" - a single bundled connection (SP_PIPE) that carries the pieces a sampler needs, instead of four or five separate wires crisscrossing your graph. It's the same idea behind pipe-style nodes in other packs (Efficiency Nodes, Impact Pack's various pipe types): once your graph has more than a couple of samplers, keeping model/conditioning/latent bundled on one wire is a lot easier to read than re-tracing four individual lines every time you want to know what feeds what.

How it works

The required sp_pipe input is where the model, conditioning, and latent this node needs are expected to already be bundled - built by an earlier node in this pack's pipe family upstream in your graph. From there, SP_KSampler behaves like a fairly ordinary KSampler underneath: seed, steps, cfg, sampler_name, scheduler, and denoise are the same parameters you'd set on the stock node, with the same jobs - cfg balances prompt adherence against quality (the node's own tooltip: "too high values will negatively impact quality"), denoise controls how much of the input latent structure survives (useful for img2img-style partial denoising, at 1.0 for a full generation from noise).

Past that, it adds two things the stock node doesn't have built in: vae_decode (on by default) automatically decodes straight to an image, and preview (also on by default) shows it as it runs - which is the collapsing-three-nodes-into-one part. tile_size gives you tiled VAE decoding for large images without a separate node, and inject_noise is an extra noise knob beyond the standard denoise parameter.

The optional inputs (model, positive, negative, latent_image, image, sampler, sigmas) exist as an escape hatch - wire any of them in directly to override just that one piece of the pipe without rebuilding the whole bundle upstream.

Inputs and outputs that matter

  • sp_pipe - the bundled model/conditioning/latent this node samples from.
  • seed, steps, cfg, sampler_name, scheduler, denoise - the core sampling settings, functioning exactly like the stock KSampler's.
  • inject_noise - extra noise beyond what denoise alone controls.
  • tile_size - tiled VAE decode for large outputs; 0 likely means untiled.
  • vae_decode / preview - decode-to-image and live preview, both on by default.
  • Optional overrides: model, positive, negative, latent_image, image, sampler, sigmas - bypass one piece of the pipe without touching the rest.
  • Outputs: SP_PIPE (the denoised latent, re-bundled for the next pipe-aware node), SP_PIPE_SRC (the decoded image, also pipe-typed), LATENT and IMAGE (plain, list-typed outputs for wiring into non-pipe-aware nodes).

How to install it

Through ComfyUI Manager: search "SP-Nodes," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/bananasss00/ComfyUI-SP-Nodes

Restart ComfyUI afterward. No extra models or dependencies for this node itself.

Common issues & troubleshooting

Nothing is wired into sp_pipe and the node errors. It's a required input - you need an upstream node in this pack building the pipe first; this isn't a standalone KSampler replacement if you're not already using the pipe pattern elsewhere in your graph.

An override input doesn't seem to take effect. The optional overrides only replace their specific piece of the pipe - if you're expecting a model override to also change conditioning, it won't; wire in positive/negative separately if those need overriding too.

Output image looks wrong but the LATENT looks fine. Since vae_decode runs automatically here, a bad VAE (wrong one for your checkpoint, or none loaded upstream in the pipe) will show up as a broken decode even though sampling itself succeeded - check what VAE the pipe is actually carrying before assuming the sampler settings are at fault.

CategorySP-Nodes/Group Nodes

Inputs (18)

NameTypeDefaultDescription
sp_pipeSP_PIPE
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 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.
schedulerCOMBObetaThe scheduler controls how noise is gradually removed to form the image.
denoiseFLOAT1.000–1The amount of denoising applied, lower values will maintain the structure of the initial image allowing for image to image sampling.
inject_noiseFLOAT0.000–20
tile_sizeINT00–2048
vae_decodeBOOLEANtrue
previewBOOLEANtrue
modeloptMODELThe diffusion model the LoRA will be applied to.
positiveoptCONDITIONING
negativeoptCONDITIONING
latent_imageoptLATENTThe latent image to denoise.
imageoptIMAGEThe image to denoise.
sampleroptSAMPLER
sigmasoptSIGMAS

Outputs (4)

NameTypeDescription
SP_PIPESP_PIPEThe denoised latent.
SP_PIPE_SRCSP_PIPEThe decoded image
LATENTLATENT
IMAGEIMAGE