Fractal Art Generator V2
Actual Mandelbrot in ComfyUI, now in color
- IMAGE
You don't need a diffusion model to make trippy art - a Mandelbrot set at 1024×1024 is already gorgeous, and it renders in seconds instead of minutes. FractalGeneratorV2 is DJZ-Nodes' escape-time fractal renderer with real color control bolted on. If you've ever wanted fractal backgrounds, textures, or just a hallucination-ready source image to feed into img2img or a ControlNet pipeline, this is the node. V2's whole reason to exist over V1 is the color system.
How it works
It's a genuine escape-time fractal renderer, iterating a complex function per pixel (z = z^p + c and friends) until it escapes a radius, then coloring by iteration count. Under the hood it's numpy vectorized across the whole grid, so even 4K renders are fast - the escape iterations dominate the cost, which is what max_iterations (50-2000, default 500) controls. Higher iterations reveal deeper detail but cost time.
Presets: Classic Mandelbrot, Julia Set, Burning Ship, Tricorn, Newton, and Custom. The Newton fractal is a genuinely different beast - it colors by which cube root of unity each pixel converges to, giving those smooth colored basins, and the source handles it with special-cased code. The other four share the same iterate-and-escape pipeline with different equations.
The inputs that matter
- preset - the fractal family. Start with Classic Mandelbrot.
- zoom_level - how deep you are. Combined with x_center / y_center (optional, default -0.75, 0.0 - the classic spot), this is how you explore. Bump zoom to 5+ and drift the centers by tiny amounts to get those infinite-detail regions.
- color_preset - the V2 headline feature: eight palettes (Classic White-Grey, Electric Blue, Fire, Rainbow, Deep Space, Ocean, Forest, Psychedelic).
- power (2-5) - the exponent in
z^p + c. Higher powers warp the set into those multi-lobed shapes. - escape_radius (1-10) - when a point "bails out." Default 2 is standard; lower it for denser, muddier interiors.
- color_cycles - how many times the palette wraps across the iteration range. 0.1 gives long smooth gradients, 5+ gives tight psychedelic banding.
- smooth_coloring - smooths the iteration counts so you get gradients instead of hard contour bands. Leave it on.
- width / height - up to 4096. Output is an IMAGE tensor ready to wire anywhere.
Installing
Part of DJZ-Nodes (Drift Johnson / MushroomFleet):
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Or "DJZ-Nodes" in ComfyUI Manager. Needs numpy and PIL, both in the pack's requirements.
Tips
The fun combo nobody mentions: render a FractalGeneratorV2 image and pipe it into an img2img pass - the fractal's edge detail gives the sampler a ton to work with, and you get fractal-organic hybrids. For video, batch it by varying the seed of a downstream noise node rather than re-rendering. And the Newton preset at low max_iterations is the fastest way to a smooth abstract piece; the Mandelbrot wants more iterations to shine. If all you need is a grey-scale fractal, V1 (without the color controls) is the leaner pick.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464–4096 | — |
| height | INT | 102464–4096 | — |
| max_iterations | INT | 50050–2000 | — |
| preset | COMBO | Classic Mandelbrot | 6 options: Custom, Classic Mandelbrot, Julia Set, Burning Ship, Tricorn, Newton |
| zoom_level | FLOAT | 1.00.1–100 | — |
| color_preset | COMBO | Classic White-Grey | 8 options: Classic White-Grey, Electric Blue, Fire, Rainbow, Deep Space, Ocean, +2 |
| power | FLOAT | 2.02–5 | — |
| escape_radius | FLOAT | 2.01–10 | — |
| color_cycles | FLOAT | 1.00.1–10 | — |
| smooth_coloring | BOOLEAN | true | — |
| x_centeropt | FLOAT | -0.7500-2–2 | — |
| y_centeropt | FLOAT | 0.0000-2–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |