Petty Paint Load Image
Load an image straight from an absolute path on disk
- imagepath
- IMAGE
- IMAGE
- WIDTH
- HEIGHT
Core ComfyUI's Load Image only browses its input folder - you drop a file in, refresh, pick it from a dropdown. That's fine until your image lives somewhere else entirely, like inside the folder of another program. PettyPaintLoadImage fixes exactly that: you hand it an absolute file path and it loads whatever's there. No copying files into ComfyUI/input, no refresh dance.
This is the primary way the petty-paint pack reads images from the Petty Paint app, Andrew Porter's web canvas that reimagines doodles through Stable Diffusion. The app writes layers to its own directories, and this node reads them back in without you shuffling files around.
How it works
Give it imagepath - a full filesystem path to an image (PNG, JPG, GIF, whatever PIL can open). It loads the file, transposes EXIF orientation, converts to RGB, and iterates frames so an animated GIF becomes a batch. It returns two IMAGEs and two INTs:
- First
IMAGE- the RGB image (or frame batch). - Second
IMAGE- its alpha channel as a mask-style image, inverted (alpha 0 becomes white). If the file has no alpha, you get a 64×64 black placeholder instead - a known quirk, not a feature. WIDTH,HEIGHT- the original file's pixel dimensions as ints, ready for aspect-ratio math.
The trap: missing files don't error
Here's the gotcha that will confuse you once. If the path doesn't exist - wrong filename, trailing space, case mismatch - the node does not raise. It silently returns a black 100×100 placeholder image, a None mask, and 0, 0 for width and height. Your downstream nodes run on a black square and you have to notice the dims are zero to realize anything's wrong. If your output is suddenly black, check WIDTH/HEIGHT - they'll both be 0.
The inputs and outputs
imagepath-any; pass a path STRING (typically from another node or the app's state).- Outputs:
IMAGE,IMAGE,WIDTH(INT),HEIGHT(INT).
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 model downloads needed.
Common issues
Beyond the silent-black-placeholder trap, watch out for the None mask when the file has no alpha channel - a node expecting a real MASK will complain. And if you're on Windows, mind the backslashes in paths; feed it a path from the app's own state file rather than hand-typing it when you can. The pack's PettyPaintLoadImages handles whole lists of paths if you're loading many layers at once.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| imagepath | * | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |
| WIDTH | INT | — |
| HEIGHT | INT | — |