Nodes/petty-paint-comfyui-node/PettyPaintKSampler
ComfyUI Node

PettyPaintKSampler

A KSampler with a skip switch and size outputs

By mephisto83·Created 2 years ago·Updated 2 years ago· 3
PettyPaintKSampler
  • model
  • positive
  • negative
  • latent_image
  • LATENT
  • skip
  • width
  • height
skipfalse
seed0
steps20
cfg8.0
sampler_name
scheduler
denoise1.00

Let's get this out of the way: for normal, every-day generation, this node samples identically to core ComfyUI's KSampler. Same samplers, same schedulers, same CFG semantics - it literally calls the same underlying sampling routine. What it adds are three things a plain KSampler doesn't have: a skip input that makes it a no-op pass-through, and width/height outputs so downstream logic knows the latent's pixel size without decoding it. That combination is what turns a sampler into a controllable stage in a state-driven pipeline.

The pack is the ComfyUI-side integration for Petty Paint, Andrew Porter's web canvas that reimagines doodles through Stable Diffusion. Its workflows don't always want to sample - sometimes a render already exists and the graph just needs to flow through - and skip is how that's expressed.

How it works

Wire up the usual suspects: model, positive, negative, latent_image, plus seed, steps, cfg, sampler_name, scheduler, and denoise. When skip is false, it runs a standard KSampler pass. When skip is true, it does no sampling at all: it returns your latent unchanged, passes the skip value through, and computes width/height as the latent dimensions times 8 (the VAE downscale factor) so you get real pixel numbers.

So the pattern is: check whether a file already exists (or whether you want to regenerate), feed that boolean to skip, and the same graph both skips and reports the size it would have produced. Downstream branches on the boolean and the dims without needing a decode.

The inputs and outputs

  • The standard KSampler set, plus:
  • skip - BOOLEAN (forced input); true means no sampling.
  • Outputs: LATENT (sampled or passed through), skip (BOOLEAN passthrough), width and height (INT, pixel size).

The honest take

If you're building a one-shot text-to-image graph, use the core KSampler - there's nothing here for you. Reach for this when you're building conditional or looping workflows where a stage must sometimes not run. It's a niche but genuinely useful tool, and the width/height outputs save you a VAE decode every time you just want to know the size.

Installing it

Same pack, same install - ComfyUI Manager, search "petty-paint-comfyui-node":

cd ComfyUI/custom_nodes
git clone https://github.com/mephisto83/petty-paint-comfyui-node

Restart ComfyUI. Declared dependency is Flask==2.1.2; the models are your normal checkpoints.

Common issues

The skip input is forced, so ComfyUI won't let you just click a checkbox and forget it - wire it from a boolean source or a logic node. When skip is on, remember the latent is untouched: if you were expecting a freshly denoised result and got the input latent back, that's the skip working as designed, not a bug. And if you need start_at_step/end_at_step control or add_noise handling, that's PettyPaintKSamplerAdvanced in the same pack - same skip logic, more knobs.

CategoryPettyPaint

Inputs (11)

NameTypeDefaultDescription
modelMODEL
skipBOOLEANfalse
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28
schedulerCOMBO9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1

Outputs (4)

NameTypeDescription
LATENTLATENT
skipBOOLEAN
widthINT
heightINT