PettyPaintVAEDecode
A VAE decode that can hand you a placeholder instead of a render
- samples
- vae
- IMAGE
- skip
The VAE decode is the last expensive step of a generation, and in the petty-paint loop it's often wasted work: the iPad hasn't sent anything new, the sampler skipped, and decoding whatever's in the latent gives you the same image you already had. PettyPaintVAEDecode is the stock VAEDecode plus an escape hatch - a skip flag that, when tripped, skips the real decode and hands back a tiny placeholder image instead. It's the tail end of the pack's skip chain, and it exists to keep an idle pipeline from burning GPU time.
How it works
The required inputs mirror the built-in node: samples (LATENT), vae (VAE), plus a skip boolean that defaults to off. With skip off, it does exactly what you'd expect - vae.decode(samples) - and returns the decoded IMAGE. With skip on, it bypasses the VAE entirely and returns a small blank image sized by the optional width and height inputs, which default to a barely-useful 10×10.
That 10×10 default is the first thing to know. The placeholder isn't meant to be seen - it's there so whatever's downstream (an image saver, a preview, a PettyPaintImageStore) still receives a valid IMAGE tensor and doesn't error out. If you actually need the placeholder to be a sensible size - say you're compositing it into a real canvas - set width and height explicitly. The node also passes the skip value through on its second output, so downstream logic can tell whether this was a real render or a stand-in.
The outputs that matter
IMAGE- the decoded image, or the placeholder when skipped.skip- the boolean, passed straight through, ready to drive a switch or a conditional.
Where it fits
Use it when you're building the full skip chain: SkippableVAEEncode at the front, PPKSamplerAdvanced in the middle, this at the end. When the iPad hasn't produced new art, all three agree to skip and the graph runs in a fraction of the time, with a placeholder flowing out instead of a render. If you're not using the pack's skip pattern, there's no reason to reach for this over the built-in VAEDecode - the only thing it adds is the bypass.
Installing it
It's part of the petty-paint pack, installed once for all the nodes: ComfyUI Manager search "Petty Paint", or:
cd ComfyUI/custom_nodes
git clone https://github.com/mephisto83/petty-paint-comfyui-node
restart, no models to download. The pack's pinned Flask dependency isn't imported by the current source, so nothing heavy comes along.
When it bites you
The trap is forgetting the skip chain is opt-in. If skip gets tripped but your sampler didn't skip with it, you'll get a 10×10 blank where you expected a real image, and it can be genuinely confusing - the node ran "successfully." Check the skip output when your results suddenly look empty. And if you're saving outputs for later, make sure you don't permanently overwrite a good render with a placeholder; gate the save on the skip flag being false.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| skip | BOOLEAN | false | — |
| samples | LATENT | — | |
| vae | VAE | — | |
| widthopt | INT | 100–18446744073709550000 | — |
| heightopt | INT | 100–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| skip | BOOLEAN | — |