Nodes/ComfyUI WPX Nodes/CircleContour
ComfyUI Node

CircleContour

Concentric rings of stickers, like a target made of a sticker sheet

By WangPengxing·Created 2 years ago·Updated 2 years ago· 0
CircleContour
  • circle_image
  • stickers
  • main_sticker
  • image
n_scales3
max_sticker_count80
spacing30
overlap_threshold_contour0.60
bg_sticker_size330
main_sticker_size450
crop_imagefalse
padding0

CircleContour is the WPX pack's answer to "what if my shape is just a circle?" It detects the biggest circle in an input image, draws several concentric rings inside it, and fills each ring with stickers. The result looks like a circular sticker sheet or a target board made out of stickers - which is exactly the effect sticker designers want for badge art, logo ornaments, and circular mascot seals. It's the circle-specific cousin of AnimalContour, same pack, same no-model pure-CPU approach.

How it works

The node reads your circle_image, threshold-binarizes it, and takes the largest contour's bounding box to work out the circle's center and radius. It then generates n_scales concentric circles by shrinking the radius in even steps - a ring per scale. Each ring is handed to the same contour-filling routine AnimalContour uses: stickers sampled along the circle's edge, rotated to follow the tangent, overlap-checked via IoU, plus a fill of the disk's interior. The max_sticker_count budget is split across layers (count // layer), so the outer rings get the most stickers and the inner ones taper off, which is why the composition looks balanced instead of one wall of stickers. All layers are alpha-composited onto one transparent canvas.

The inputs that matter

  • circle_image - a solid circle, ideally white on black or any clean shape whose largest contour is the circle you mean.
  • stickers - the pool of stickers for the rings. Pass a batch; it cycles through them.
  • main_sticker - placed at the center of the innermost ring.
  • n_scales (default 3) - how many concentric rings. More rings = finer, denser spiral-ish look; fewer = chunky bands.
  • max_sticker_count (80), spacing (30), overlap_threshold_contour (0.6) - the usual arrangement knobs from the pack: total sticker budget, spacing between samples along each ring, and max allowed IoU overlap.
  • bg_sticker_size (330) / main_sticker_size (450) - long-side scaling for ring stickers and the centerpiece.
  • crop_image (bool) + padding - trims transparent margins off your sticker PNGs before arranging, if your stickers aren't already tight.

Output is a single image (RGBA). Preview or save it like any other image.

Installing

ComfyUI Manager → search "ComfyUI WPX Nodes" → install → restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/WangPengxing/ComfyUI_WPX_Node
# restart ComfyUI

No models, no API keys, no requirements file. The usual pack-level trap applies: the pack imports rtree and scipy at startup, so if either is missing you won't see any WPX_Node nodes, not just this one. pip install rtree scipy and restart.

Troubleshooting

  • The rings aren't centered. The circle is derived from the largest contour's bounding box. If your image has a border or stray marks, the center drifts. Feed it a clean, isolated circle.
  • The composition looks sparse. Bump max_sticker_count or lower spacing. At the default 80 stickers across 3 rings, a big canvas runs out fast.
  • [DEBUG] console spam and pop-up preview windows. Every node in this pack prints shape info and calls .show() on output crops; on a headless box that just spams the log. Ignore it.

Honest note: this is a 0.0.1 pack, last touched in early 2025, with essentially no community footprint - you're the early adopter, so expect rough edges. But for round sticker arrangements it does in one node what would take a small pile of manual positioning.

CategoryWPX_Node/main_image

Inputs (11)

NameTypeDefaultDescription
circle_imageIMAGE
stickersIMAGE
main_stickerIMAGE
n_scalesINT31–10
max_sticker_countINT801–1000
spacingINT301–1000
overlap_threshold_contourFLOAT0.600–1
bg_sticker_sizeINT3301–1000
main_sticker_sizeINT4501–1000
crop_imageBOOLEANfalse
paddingINT00–1000

Outputs (1)

NameTypeDescription
imageIMAGE