Batch Shape (mtb)
Procedurally generate a batch of simple 2D shapes
- color
- bg_color
- shade_color
- IMAGE
Sometimes you don't need a diffusion model at all - you just need a circle, a box, or a tube rendered cleanly to a fixed size, and you need a batch of them. Batch Shape is MTB Nodes' procedural shape generator: no sampling, no checkpoint, just geometry drawn directly to a tensor. The pack itself flags the shading option as experimental, so treat the fancier end of this node as a bonus, not the reliable core.
What it's actually good for
Test patterns for a pipeline you're debugging (a known, simple shape is easier to eyeball-check after a crop, resize, or color operation than a photo is). Placeholder or mask geometry - a circle or box mask is a two-second job here instead of a manual paint. Motion-graphics elements for compositing - a batch of shrinking circles, say, layered under generated content. And because it outputs a count-sized batch rather than a single image, it's a fast way to build test batches of a known, controlled size for exercising other batch nodes in this pack.
The inputs and output that matter
shape-Box,Circle,Diamond, orTube.count- how many frames in the output batch (all identical unless you're driving other parameters per-frame from outside this node, since none of its numeric fields accept aFLOATSlist directly).image_width/image_height(default 512 each) andshape_size(default 100) - canvas size and the shape's own size within it.color,bg_color,shade_color- hex-coded color pickers (default white shape on black background) for the shape fill, the canvas background, and the shading tint.thickness- outline/stroke thickness.shadex/shadey- shading offset on each axis; this is the part the pack marks experimental, so don't be surprised if it behaves a little rough around the edges.
Output is a single IMAGE batch.
Installing it
ComfyUI Manager: search MTB Nodes, install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
then restart ComfyUI. No models - this is drawn geometry, computed locally with no downloads.
Common issues
If you're building a mask rather than decoration, keep bg_color and color at pure black and pure white (the defaults) and skip the shading entirely - shading only matters for a visual/compositing use, and it complicates a clean binary mask if you're piping the output into something that expects one.
For anything odder - a shape that renders but looks wrong, or shadex/shadey producing an unexpected result - remember the pack itself calls that part experimental, so it's worth trying a simpler config before assuming your graph is misconfigured.
And the standing pack-wide note: MTB logs [comfy_mtb] Some nodes (N) could not be loaded at startup rather than failing outright, pointing you at http://127.0.0.1:8188/mtb for the real reason - a behavior other users have hit and confirmed. If Batch Shape isn't in your node list after installing, check that line first.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| count | INT | 1 | — |
| shape | COMBO | Circle | 4 options: Box, Circle, Diamond, Tube |
| image_width | INT | 512 | — |
| image_height | INT | 512 | — |
| shape_size | INT | 100 | — |
| color | COLOR | #ffffff | — |
| bg_color | COLOR | #000000 | — |
| shade_color | COLOR | #000000 | — |
| thickness | INT | 5 | — |
| shadex | FLOAT | 0.00 | — |
| shadey | FLOAT | 0.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |