PettyPaintKSamplerAdvanced
The advanced sampler with a skip switch and leftover-noise control
- model
- positive
- negative
- latent_image
- LATENT
- skip
- width
- height
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),widthandheight(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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| skip | BOOLEAN | false | — |
| add_noise | COMBO | 2 options: enable, disable | |
| noise_seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 | |
| scheduler | COMBO | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 100000–10000 | — |
| return_with_leftover_noise | COMBO | 2 options: disable, enable |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| skip | BOOLEAN | — |
| width | INT | — |
| height | INT | — |