Triangles Plus Generator
Triangles, a seed, nothing else
- IMAGE
Triangles Plus is a procedural art generator: you give it a width, a height, and a seed, and it draws a field of triangles that fills the canvas. That's the entire input surface - three knobs, one output. It's the kind of node that feels almost too simple until you realize a seeded triangle field is a genuinely useful thing to have around: background plates, texture sources, abstract thumbnails, or raw material to feed a ControlNet or img2img pass.
How it works
Under the hood it seeds Python's random and numpy's RNG with your seed, then lays out triangle groups across a canvas using PIL.ImageDraw. The geometry isn't random noise - the code positions triangles in structured segments (quadrants, edges, center bands), so you get a balanced abstract composition rather than confetti. The same seed always produces the same image, which is the reproducibility you want when one of these accidentally looks perfect and you need it back later.
The palette is where V1 is minimal: the color choices are implicit in the seeded randomness, not controllable. If you want to pick the background or steer the palette, that's exactly what V2 added.
Inputs and outputs
- width / height (64–4096, default 1024) - canvas size
- seed (0–4294967295) - the composition's DNA
Output: a single IMAGE at your requested dimensions. Batch is one image - this node doesn't take an input batch, it generates.
Where it earns its keep
ComfyUI's whole deal is that generated content can be the input to further stages. A seeded triangle field is a great source image for img2img - "stylized geometric background" without hunting a stock image - or a ControlNet canny/depth source if you want the sampler to obey the triangle geometry. It's also a solid LoRA-testing substrate: consistent geometric content that changes predictably with seed sweeps.
Honestly though, for most people V1 is a stepping stone. There's a ceiling on what three knobs can do, and the answer is usually "use V2" - same idea, but with a background color, five curated palettes, and size/count presets. If you're starting fresh, skip straight there; V1 is worth knowing because it's the simpler mental model for how the seeded drawing works.
Install
Part of DJZ-Nodes by Drift Johnson. ComfyUI Manager → "DJZ-Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Restart ComfyUI. Needs PIL/numpy/torch - all present in ComfyUI.
Gotchas
Large canvases (4096²) with the default composition take a moment, but it's PIL drawing, not inference - nothing will melt. And because V1 has no palette control, the colors are whatever the seeded RNG produced; if a run's palette is ugly, change the seed rather than hunting for a color knob that doesn't exist.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464–4096 | — |
| height | INT | 102464–4096 | — |
| seed | INT | 00–4294967295 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |