Petty Paint
The hub node that runs a local server and hands your workflow everything
- civitai_api_key
- localUrl
- root
- model
- lora
- setups
- MODEL
- CLIP
- VAE
- IMAGE
- LORA_STACK
- Prompt
- Negative Prompt
- steps
- denoise
This is the node the whole pack is named after, and it's not a utility - it's a bridge. Petty Paint (pettypaint.com) is a web app built by Andrew Porter, born from a wonderfully honest premise: "I'm a terrible artist, so I made a website that lets me draw on a canvas, and then the canvas is reimagined through stable diffusion." You sketch a rough scene in your browser, pick a model and LoRAs, and the site renders it. PettyPaintComponent is the ComfyUI side of that partnership: it starts a small local HTTP server, and the Petty Paint web app talks to it, feeding your drawing, prompts, model choice and LoRA list into a ComfyUI workflow that renders on your own GPU instead of a cloud API.
So if you're running ComfyUI and using Petty Paint, this node is the adapter that makes the two see each other. If you've never heard of Petty Paint, this node is a forty-line server with fifteen outputs - probably not for you.
How it works
When the node validates, it starts an HTTP + WebSocket server on the port you give it (default 5005) and exposes endpoints the web app hits: it receives the drawing via /draw_images, receives model/LoRA/setup selections via /render_targets, and serves rendered results and image listings back out. On the receiving end it does real work: it downloads the chosen model and LoRAs from Civitai into your configured folders (using a downloadUrl plus your Civitai API key as a token), tracks everything in a model_dict.json project file in your root folder, and then loads the checkpoint, your source drawing, the prompts, and the LoRA stack.
The output side is the payoff - fifteen outputs, one cable each: MODEL, CLIP, VAE, the source IMAGE, a ready LORA_STACK, the positive/negative prompts, steps, denoise, plus the config strings (localUrl, root, model, lora, setups, civitai_api_key). Wire those into a sampler and the workflow renders exactly what the web app set up.
The inputs that matter
civitai_api_key- required for model/LoRA downloads. Without it, downloads fail.port- string, default "5005". Where the server listens.root_folder,model_folder,lora_folder- all three must point at directories that already exist; the node validates this and refuses with a red error if any is missing.root_folderis wheremodel_dict.jsonand rendered images live.settings_file- extra settings path, wired if you have one.- Outputs: the full 15-tuple above.
Installing it
The pack's real dependency lives here - Flask==2.1.2 (the web-app communication side). Install the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/mephisto83/petty-paint-comfyui-node
pip install -r requirements.txt # Flask, if ComfyUI Manager doesn't do it
Restart ComfyUI, or use ComfyUI Manager and search "petty-paint-comfyui-node".
Common issues
The folder validation is the first wall - all three folders must exist before the node runs, and the error message names the one that doesn't. The Civitai key is the second: downloads need a valid key with a token, or models silently never arrive. And be careful about the server itself: it binds to all interfaces on your port, so anything on your network can reach it. Don't expose it past your firewall, and remember IS_CHANGED re-triggers the node whenever the project file or your drawing changes, so it re-executes every time you redraw in the app. If you're not actually using the Petty Paint web app, none of this is worth the Flask dependency - but for its intended use, it's the whole point of the pack.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| civitai_api_key | STRING | — | |
| port | STRING | 5005 | — |
| root_folder | STRING | — | |
| model_folder | STRING | — | |
| lora_folder | STRING | — | |
| settings_file | STRING | — |
Outputs (15)
| Name | Type | Description |
|---|---|---|
| civitai_api_key | STRING | — |
| localUrl | STRING | — |
| root | STRING | — |
| model | STRING | — |
| lora | STRING | — |
| setups | STRING | — |
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| VAE | VAE | — |
| IMAGE | IMAGE | — |
| LORA_STACK | LORA_STACK | — |
| Prompt | STRING | — |
| Negative Prompt | STRING | — |
| steps | INT | — |
| denoise | FLOAT | — |