ComfyUI Node

Kaleido

The mirror-play node for psychedelic transitions

By criskb·Created 7 months ago·Updated 5 months ago· 0
Kaleido
  • image
  • mask
  • image
  • mask
  • kaleido_info
settings_json{"segments":6,"rotation":0.0,"spin":35.0,"zoom":1.0,"center_x":0.5,"center_y":0.5,"source_angle":0.0,"source_spread":0.75,"source_orbit":0.0,"prism_split":0.08,"edge_fade":0.18,"mix":1.0,"mask_feather":12.0,"invert_mask":false}

Every once in a while you need a frame to spiral into a mandala, or a music-video cut that smears into symmetrical chaos before snapping back. Kaleido is the MKRShift node that does the classic kaleidoscope mirror effect on any image: it folds the source into N mirrored segments around a center, and gives you enough spin, zoom, and phase controls to animate it into a real transition rather than a static gimmick. It's in MKRShift Nodes/VFX/Play, the pack's "let's have fun with the frame" lane, and it's pure, deterministic image resampling - instant on any frame.

How it works

The node builds a distortion grid: every output pixel's source position is folded into the nearest mirrored wedge of the segments-sided fan, so each wedge shows a reflection of its neighbors. The result is a perfectly symmetric pattern from any input - a face becomes a multi-faced rosette, a city skyline becomes a cathedral mandala. Because it's just resampling, it works on anything: photos, renders, video frames, the output of any other node.

The settings bundle gives you a surprising amount of animation control:

  • segments (2–32, default 6) - the symmetry count. 6 is the classic mandala; 4 reads more geometric.
  • rotation / spin - static angle vs. continuous rotation. Drive spin with time for video and the whole pattern revolves.
  • zoom, center_x, center_y - where the fan's focal point sits and how big the pattern is.
  • source_angle, source_spread, source_orbit - this is the hidden gem: they control which slice of the original image feeds the pattern and how it roams. With a slow orbit you get that gliding, liquid kaleidoscope feel instead of a frozen snowflake.
  • prism_split (0.08) - adds a faint RGB split for a prismatic edge, edge_fade (0.18) feathers the wedge boundaries so the folds aren't razor-sharp.

Outputs and wiring

The output image is your psychedelic frame; mask reflects the pattern (useful for compositing the effect over the original), and kaleido_info reports the resolved settings. The optional mask input scopes the effect to a region - combine that with a low mix and you can fade from normal to full mandala across a sequence, which is the standard transition move.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

then restart, or search MKRShift_Nodes in ComfyUI Manager. No pip requirements, no model downloads - this is numpy/torch grid sampling, so it's cheap enough to run on every frame of a video.

Two practical notes. First, the pattern quality depends entirely on your source: images with strong color and detail make gorgeous kaleidoscopes; flat, low-contrast frames look like grey mush folded eight ways. Second, the spin/zoom controls make it easy to overshoot into nausea territory - if you're animating, small values over many frames beat huge values in one. And yes, the edge of the frame matters: fold artifacts near the pattern rim are normal, which is exactly what edge_fade exists to hide.

CategoryMKRShift Nodes/VFX/Play

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"segments":6,"rotation":0.0,"spin":35.0,"zoom":1.0,"center_x":0.5,"center_y":0.5,"source_angle":0.0,"source_spread":0.75,"source_orbit":0.0,"prism_split":0.08,"edge_fade":0.18,"mix":1.0,"mask_feather":12.0,"invert_mask":false}
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
kaleido_infoSTRING