PettyPaintLoadImages
Load a whole list of layer paths in one go
- images
- IMAGE
- MASK
Single-file loaders are fine until you're dealing with a stack of layers - a background, a character, a prop, ten masked plates - and you'd rather hand the graph one list of paths than wire ten loaders. PettyPaintLoadImages is the batch version: give it a list of absolute file paths, get back every image and every alpha mask in one shot. It's the load half of the petty-paint pack's layer-stack workflow.
The pack is the ComfyUI-side integration for Petty Paint, Andrew Porter's web canvas where you doodle and Stable Diffusion reimagines the result. The app works in layer files on disk, and this node turns a whole directory of those paths into tensors without you dropping anything into ComfyUI/input.
How it works
images is typed any - the expectation is a list of filesystem paths. For each path it opens the file, applies EXIF orientation, converts to RGB, and - the useful part - iterates frames, so an animated GIF or multi-frame file expands into a batch. Each frame also yields an alpha mask, inverted the way ComfyUI masks like it (white = transparent area in the source). Files without alpha get a 64×64 black placeholder mask instead.
Outputs are IMAGE and MASK. Two things to know:
- The results come back as Python lists, not single tensors - if a downstream node grumbles about a list, throw an
indexat it. - Frames from multiple files get concatenated along the batch axis, so your output batch can span several files.
The inputs and outputs
images-any; a list of absolute paths to load.- Outputs:
IMAGE(batch) andMASK(batch, one per frame).
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; no models, no heavy deps.
Common issues
If a path doesn't exist, the node skips it silently - so a typo in one entry just means that layer quietly disappears from your batch. Missing alpha gives you those placeholder black masks, which will read as "fully covered" if you feed them into compositing; prefer the pack's mask-aware path when alpha matters. And remember the list return: many nodes in this pack hand back lists rather than tensors, and it's the single most common cause of "list has no attribute shape" errors around here.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |