PettyPaintTexts_to_Conditioning
CLIP-encode a whole list of prompts in one shot
- clip
- texts
- CONDITIONING
The petty-paint iPad app doesn't send you one prompt - it sends several, one per setup or frame, and you want them all encoded so the graph can pick and choose. Dragging a CLIPTextEncode in per prompt gets silly fast. PettyPaintTexts_to_Conditioning is the bulk version: hand it a CLIP model and a list of prompt strings, and it CLIP-encodes every one, returning a matching list of conditionings.
How it works
The mechanism is a loop around ComfyUI's stock text encoder. For each string in the texts input it instantiates the standard CLIPTextEncode node and runs it with your clip, collecting each CONDITIONING result into a list that comes out the single output. Nothing fancy - it's the same encoding you'd get from doing the nodes by hand, just batched by the node so the graph stays readable.
The inputs that matter
clip- the CLIP model from your checkpoint or CLIP loader.texts- typed as*(any), but it has to be a list of strings, not a single string.
That last point is the trap, and it's a good one. Because texts accepts any, it's tempting to feed it a plain string from a PettyPaintText node. Python will happily iterate over that string - character by character. You'll get a conditioning per letter, and your sampler will do something baffling with "c", "a", "t", "s". If your output looks like nonsense or your list is suspiciously long, check what you actually wired into texts. Feed it from a node that produces a list (the pack's JSON JsonReadArray path, or any list-generating node) and you're fine.
Where the output goes
The output is a list of conditionings, not one conditioning. Nodes that accept * can take it directly, and any node in this pack that loops or selects (like PPSelectRandomValue) can pull one out for a single sampler pass. If you're not working with lists, a plain CLIPTextEncode is the better tool - this node's whole reason to exist is the batch case.
Installing it
Same as every node in this pack - install once, use all of them. ComfyUI Manager search "Petty Paint", or:
cd ComfyUI/custom_nodes
git clone https://github.com/mephisto83/petty-paint-comfyui-node
Restart ComfyUI. No models to fetch, and the pack's pinned Flask dependency isn't actually imported by the current code, so nothing heavy gets installed.
Gotchas
Besides the list-versus-string trap, remember that each string in the list gets encoded independently with the same clip - so any weighting syntax you use must be valid for your model's encoder. And because encoding happens for the whole list on every run, a long list costs you CLIP time whether you end up using all of it or not. Keep the list tight and you'll never notice; let a hundred entries in and you will.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| texts | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |