❄️ Crystallize
Shatter Your Image Into Facets Like a Stained-Glass Window
- image
- IMAGE
Crystallize breaks your image into a mosaic of shards - the classic "shattered glass / stained glass" effect where the scene is rebuilt from irregular facets, each filled with the average color of the area it covers. It's the same family as the pack's Hexagonal Pixelate, but where that one imposes a regular honeycomb grid, this one scatters irregular polygons, which reads as organic and crystalline rather than geometric.
It's a stylization pass for the end of the graph, and it's the effect people reach for when they want an image to look material - frosted glass, crystal growth, or a portrait abstracted into hard facets.
How it works
The algorithm scatters num_crystals seed points across the image, then tiles the plane around them. The implementation actually uses SciPy's Voronoi under the hood for the geometric tiling, then fills each region with a color sampled from the original image around that cell. edge_enhancement pushes seed points toward detected edges, so facets tend to follow the actual contours of your subject instead of landing randomly - that's the difference between "looks like a mosaic" and "looks like smashed glass that used to be a face."
The crystal_shape choice changes how the facets are drawn: angular for jagged Voronoi shards, geometric for regular polygons (triangles/squares/hexagons picked per cell), and organic for rounded, less rigid shapes. outline_strength draws the dark seams between facets - crank it for a genuine stained-glass look.
The inputs that matter
- crystal_size (10–100, default 30) - how large each shard is on average.
- num_crystals (50–1000, default 200) - total facet count. More crystals + smaller size = finer mosaic.
- crystal_shape -
angular,organic, orgeometric. - color_variation (0–1, default 0.2) - how much each facet's color may deviate from the source; higher = more vibrant, less faithful.
- edge_enhancement (0–1, default 0.3) - how hard the seeds chase image edges. This is the "does it still look like the subject" slider.
- outline_strength (0–1, default 0.5) - darkness of the seams between facets.
- randomness (0–1, default 0.3) - irregularity of the shard shapes.
Output is the crystallized IMAGE.
Installing it
Part of ComfyUI-Image-Effects (Orion4D). ComfyUI Manager → search "Image Effects", or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects
cd ComfyUI-Image-Effects
pip install -r requirements.txt
Restart, then it's under Add Node → Image Effects. This is one of the few nodes in the pack that leans on SciPy's Voronoi, so make sure the pack's requirements.txt (SciPy ≥ 1.7) actually got installed.
Gotchas
Pack-wide rules apply: only the first image of a batch is processed, CPU-bound, and it's not deterministic - shard placement uses np.random with no seed control, so every run shatters differently. That's usually fine for a still, but if you're trying to build a consistent series, generate once and save. The bigger artistic trap: with num_crystals low and edge_enhancement high, the effect only respects the strongest edges and you lose the subject entirely. Start with edge_enhancement ~0.5 and dial from there.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| crystal_size | INT | 3010–100 | — |
| num_crystals | INT | 20050–1000 | — |
| crystal_shape | COMBO | angular | 3 options: angular, organic, geometric |
| edge_enhancementopt | FLOAT | 0.30–1 | — |
| color_variationopt | FLOAT | 0.20–1 | — |
| outline_strengthopt | FLOAT | 0.50–1 | — |
| randomnessopt | FLOAT | 0.30–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |