Nodes/ComfyUI-Image-Effects/๐Ÿ“ Voronoi
ComfyUI Node

๐Ÿ“ Voronoi

Cellular mosaics that look like a cracked windshield

By orion4dยทCreated about a year agoยทUpdated about a year agoยท 28
๐Ÿ“ Voronoi
  • image
  • IMAGE
โ—„num_seeds100โ–บ
โ—„color_modeaverageโ–บ
โ—„cell_outlinetrueโ–บ
โ—„seed_distributionrandomโ–บ
โ—„outline_colorblackโ–บ
โ—„outline_thickness2โ–บ
โ—„edge_threshold0.30โ–บ

A Voronoi diagram is what you get when you scatter points and let every region claim the space closest to its seed - the pattern of a cracked windshield, dragonfly wings, bubbles, cells under a microscope. This node turns your image into that pattern, recoloring each cell from the photo behind it. It's the "organic mosaic" sibling of Polygon and Triangulate in the geometric family, and it's the one that looks least like a filter and most like a structure.

It's part of orion4d's Image Effects pack (Geometric category). Where Triangulate gives you sharp low-poly facets and Polygon gives you a tidy grid, Voronoi gives you irregular, organic cells - better for "texture" and "biological" moods than for portraits. Put a forest or a close-up of a face through it and you get something that reads as shattered or swarming, which is exactly why people reach for it.

The mechanism

The node scatters num_seeds points, builds the actual Voronoi tessellation with scipy, then for every pixel finds its nearest seed and paints it the color of that cell. Cell color comes from a small region of the original image around the seed (average mode), from the seed pixel itself (center_point), or from a random color per cell (random - the wild option that abandons the source photo entirely).

The inputs that matter:

  • num_seeds (default 100, 10โ€“500) - cell count. 50โ€“150 is the recognizable-but-organic zone; past 300 the cells get tiny and the mosaic effect fades.
  • color_mode - average, center_point, or random. average looks like a melted version of your photo; random looks like a kaleidoscope threw up.
  • cell_outline + outline_color (black/white/adaptive) + outline_thickness - the grid lines. adaptive picks the line color per area, which is usually the most flattering.
  • seed_distribution - random, edge_based (concentrates seeds along detected edges, keeping features readable), or grid. Default is random, but edge_based is the better default for anything with a recognizable subject.
  • edge_threshold - sensitivity for the edge-based seed placement.

Output is a single IMAGE.

The performance trap

This is the slowest node in the pack, and it's not close. The cell-filling step runs a per-pixel Python loop, and for each pixel it computes the distance to every seed to find the nearest one. At 1024ร—1024 with 100 seeds that's over a hundred million pure-Python operations - expect it to sit and think for a while. Mitigate by downscaling before the node or dropping num_seeds to the low end; the mosaic survives fine at 50. Pack-wide rules apply beyond that: CPU-only, and only the first frame of a batch is processed.

Install

ComfyUI Manager: search ComfyUI-Image-Effects. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects.git
cd ComfyUI-Image-Effects
pip install -r requirements.txt

Restart, then right-click โ†’ Add Node โ†’ Image Effects โ†’ Voronoi. No model downloads. This one needs scipy for the tessellation, so if you're installing dependencies by hand, keep scipy on the list along with numpy/OpenCV/Pillow.

CategoryImage Effects

Inputs (8)

NameTypeDefaultDescription
imageIMAGEโ€”
num_seedsINT10010โ€“500โ€”
color_modeCOMBOaverage3 options: average, center_point, random
cell_outlineBOOLEANtrueโ€”
seed_distributionoptCOMBOrandom3 options: random, edge_based, grid
outline_coloroptCOMBOblack3 options: black, white, adaptive
outline_thicknessoptINT21โ€“5โ€”
edge_thresholdoptFLOAT0.300.1โ€“1โ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEโ€”