Fractal Gen Cuda
4K fractals without leaving ComfyUI
- IMAGE
FractalGeneratorV3 ("Fractal Gen Cuda" in the UI) renders actual fractals - Mandelbrot, Julia, Burning Ship, Tricorn, Newton - as images inside your workflow. No model, no diffusion: just iteration math, and it's fast because the compute runs as tensor ops on the GPU via torch, falling back to CPU when there's no CUDA. It's the texture/background generator you didn't know you needed: want a trippy backdrop, a lathe-ready texture, or a source image to img2img a "cosmic" render from? Generate the fractal, feed it to the sampler, done.
What it generates
The preset dropdown picks the fractal family:
- Classic Mandelbrot - the default, and the one people mean when they say fractal.
- Julia Set - same math, but the iteration constant is free, so it produces those swirling, seashell-ish shapes.
- Burning Ship - Mandelbrot with absolute values in the formula; looks like a burning vessel when zoomed, hence the name.
- Tricorn - the Mandelbar, its symmetry gives it a repeating three-lobed look.
- Newton - a Newton fractal based on complex roots; sharp, geometric, and the one that benefits most from GPU speed because it's the most iteration-hungry.
zoom_level (0.1–100) magnifies into the set; at high zooms you're deep in detail, so raise max_iterations (50–2000, default 500) or the deep areas go blurry. power (2–5) changes the exponent in the iteration formula - even small changes transform the pattern completely.
The inputs that matter
- width / height (64–4096, default 1024) - output resolution. This is where CUDA pays for itself; 2048+ renders are where a CPU fallback gets painful.
- color_preset - eight schemes from "Classic White-Grey" through "Fire", "Deep Space", "Psychedelic". Combined with color_cycles (0.1–10) which repeats the gradient for more color bands.
- smooth_coloring - on by default, and worth keeping on; it removes the hard iteration banding so colors flow instead of step.
- x_center / y_center (optional) - pan the view. Only really needed with the Custom preset, where you pick the coordinates and the iteration details yourself. The named presets set their own centers.
Output is a single IMAGE. Nothing else - you wire it into your sampler, VAE, or image nodes like any source image.
How it works
Under the hood it vectorizes the escape-time algorithm over a torch grid, iterating with abs(Z) <= escape_radius masks, then smooth-colors by log-scaled iteration counts. All the color mapping and fractal-family math happens in the node - you can't get "the Mandelbrot set as a latent," because it renders pixels first. That's the right call; the IMAGE output plugs into any ComfyUI pipeline.
The honest take
Is it a must-have? No - you could generate fractals in any fractal program and import them. But as a procedural source inside a workflow it's genuinely nice: no file management, fully parameterized, deterministic per seed-of-input, and you can chain dozens of renders by feeding the image into a ControlNet or img2img pass to turn it into something that looks nothing like a fractal at all. Start with Classic Mandelbrot at 1024² and 500 iterations, get the hang of zoom, then let the Newton preset melt your GPU.
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 | — |