AnimalContourSilhouette
Make the whole animal out of stickers, not just its outline
- animal_image
- stickers
- main_sticker
- image
AnimalContourSilhouette is the sibling of AnimalContour, and the difference matters: instead of outlining an animal with stickers and scattering a few inside, this node turns the entire animal shape into a sticker mosaic. You get a silhouette where the fill is built from hundreds of tiled stickers, clipped exactly to the outline. Think those "picture made of smaller pictures" posters, except the smaller pictures are stickers and the mask is your animal. It ships in the same pack (ComfyUI WPX Nodes) with no model download and no API key - pure image processing on the CPU.
How it works
The trick is that it tiles stickers first and masks second. The node builds a white canvas the size of your animal image and fills it with scaled, slightly rotated stickers (grid positions, overlap-gated the same way as its sibling). Then it uses your animal's alpha channel as a clipping mask - every sticker outside the animal's silhouette is dropped. The result is a shape that reads clearly from a distance but is made of recognizable stickers up close.
Two details make it look right:
- Where the main sticker goes. Instead of a dumb bounding-box center, it computes a distance transform of the silhouette to find the point farthest from every edge (the visual center), then binary-searches for the largest main sticker that fits fully inside the shape. That's why the hero sticker sits where your eye wants it, even for weird L-shaped animals.
- Black = transparent. The animal image is treated as an RGBA source where pure-black pixels are made transparent. A clean black silhouette on white is exactly what this node wants.
The inputs that matter
- animal_image - the silhouette, ideally black on white/transparent with an alpha channel.
- stickers - your tile pool. The more distinct stickers you pass, the less repetitive the mosaic gets.
- main_sticker - the hero piece placed at the visual center.
- max_sticker_count (200) and overlap_threshold (0.5) - how densely the fill is packed and how much overlap is tolerated.
- bg_sticker_size (250) - long side in pixels for the tiling stickers.
- crop_image (bool) + padding - if your sticker PNGs carry uneven transparent margins,
crop_imagetrims each sticker to a square around its opaque area (pluspadding). Keep this off if your stickers are already tight.
Output: a single image, RGBA, ready for a preview or save node.
Installing
ComfyUI Manager → search "ComfyUI WPX Nodes" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/WangPengxing/ComfyUI_WPX_Node
# then restart ComfyUI
No weights, no requirements file. The one real dependency trap: the pack imports rtree and scipy at startup, and if either is missing, the whole WPX_Node menu disappears rather than this one node. pip install rtree scipy fixes it.
Troubleshooting
- The silhouette comes out empty or the mask is wrong. Your animal's "black" isn't pure black, or there's no alpha channel. The node only treats
(0,0,0)as transparent, so clean up the source before wiring it in. - The fill is sparse. Raise
max_sticker_countor dropoverlap_threshold. The default 200 tiles runs out fast on a large canvas. - Console
[DEBUG]noise and pop-up preview windows. The code calls.show()on outputs, which tries to open an image viewer - on a headless machine it just errors into the log. Ignore it.
It's a 0.0.1 pack with zero community footprint and a single early-2025 update, so expect rough edges and no support forum. But for one specific job - sticker mosaic silhouettes - nothing else in the standard ecosystem does it this directly.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| animal_image | IMAGE | — | |
| stickers | IMAGE | — | |
| main_sticker | IMAGE | — | |
| max_sticker_count | INT | 2001–1000 | — |
| overlap_threshold | FLOAT | 0.500–1 | — |
| bg_sticker_size | INT | 2501–1000 | — |
| crop_image | BOOLEAN | false | — |
| padding | INT | 00–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |