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

PettyPaintKSamplerAdvanced

The advanced sampler with a skip switch and leftover-noise control

By mephisto83·Created 2 years ago·Updated 2 years ago· 3
PettyPaintKSamplerAdvanced
  • model
  • positive
  • negative
  • latent_image
  • LATENT
  • skip
  • width
  • height
skipfalse
add_noise
noise_seed0
steps20
cfg8.0
sampler_name
scheduler
start_at_step0
end_at_step10000
return_with_leftover_noise

This is the advanced variant of the pack's skippable sampler: everything PettyPaintKSampler does, plus the controls you get from core's KSampler Advanced - add_noise, start_at_step/end_at_step, and return_with_leftover_noise. The sampling math is the same routine ComfyUI uses everywhere; what makes this node worth your time is the same skip switch and the width/height outputs that turn 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. When a render already exists, the workflow shouldn't re-run it - skip expresses "don't sample, just pass the latent and tell me its size."

How it works

With skip false, it behaves like a standard KSampler Advanced: add_noise toggles whether fresh noise is injected (disable for pure refinement passes), start_at_step/end_at_step slice the sampling window (the classic pattern for refiner or second-pass workflows), and return_with_leftover_noise controls whether the latent comes back mid-denoise (enable for hires-fix chains). noise_seed replaces the plain seed since noise is now a first-class knob.

With skip true, all of that is bypassed: the latent returns unchanged, skip passes through, and width/height are computed as latent dims × 8 - real pixel numbers without a decode.

The inputs and outputs

  • The full advanced sampler set, plus:
  • skip - BOOLEAN (forced input); true means no sampling.
  • Outputs: LATENT, skip (BOOLEAN passthrough), width and height (INT).

When to reach for it

If you never need advanced controls, the plain PettyPaintKSampler in the same pack is lighter and identical in skip behavior. Reach for the advanced version when your conditional pipeline needs a second-pass refinement with a limited step window, or when the same graph has to serve both "generate" and "pass through" modes. Pair the width/height outputs with a conditional that decides whether to upscale or composite.

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; models are your normal checkpoints.

Common issues

The forced skip input means you must wire it - a checkbox alone won't do. When skip is on, expect the input latent back untouched; that's the feature. And the standard advanced-sampler footguns apply: setting end_at_step lower than start_at_step is nonsense, and leaving return_with_leftover_noise enabled on a final pass leaves you with a noisy latent that looks wrong when decoded. If the results look half-finished, check that switch first.

CategoryPettyPaint

Inputs (14)

NameTypeDefaultDescription
modelMODEL
skipBOOLEANfalse
add_noiseCOMBO2 options: enable, disable
noise_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
start_at_stepINT00–10000
end_at_stepINT100000–10000
return_with_leftover_noiseCOMBO2 options: disable, enable

Outputs (4)

NameTypeDescription
LATENTLATENT
skipBOOLEAN
widthINT
heightINT