π‘ CR Draw Shape
Render a solid shape for masks and compositing bases
- IMAGE
- show_help
CR Draw Shape draws a solid geometric shape - circle, square, triangle, hexagon, star, and a dozen more - on a background, and outputs it as an image. It's a small utility with a surprisingly wide reach: a shape on a contrasting background makes an instant mask for regional work, a base for compositing, a simple logo or badge element, or the raw material for a ControlNet or inpaint region. When you need a clean, controllable shape and don't want to leave ComfyUI to draw one, this is it.
The mask angle is the one people underuse. A white circle on black is a perfectly good mask for "generate only here" - feed it as a mask into an inpaint or a regional conditioning setup and you've defined a region without touching an image editor.
How it works
You set the canvas size, pick a shape and its color and the background color, and it renders. Beyond the basics you get placement and transform controls: x_offset / y_offset slide the shape around, zoom scales it, and rotation spins it (in tenths of a degree, up to 3600 - so full rotations are on the table). Colors come from a 30-entry named palette, or set the color to custom and supply your own hex value in the hex fields. The output is a standard IMAGE, so it flows into masks, composites, or straight to a preview.
The inputs and outputs that matter
shape- the geometry: circle, oval, square, diamond, triangle, hexagon, octagon, star, starburst, and more.width/height- canvas size. Match it to whatever the shape needs to line up with.shape_color/back_color- named colors, orcustomto use the hex inputs. For a mask, white shape on black background.shape_color_hex/bg_color_hex(optional) - your own hex values, used when the color is set tocustom.x_offset/y_offset/zoom/rotation- position and transform the shape.
Outputs:
IMAGE- the rendered shape. Wire it to a mask input, a composite, or a preview.show_help- wiki link, ignore.
How to install it
Comfyroll Studio (Suzie1 and RockOfFire), a mature utility pack - no models, no heavy dependencies.
- ComfyUI Manager - search Comfyroll Studio, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, then restart.
Also on CivitAI.
Common issues
Two small ones on the node itself: to use a custom color you have to set shape_color (or back_color) to custom and fill in the matching hex field - set one without the other and you get the wrong color. And if you plan to use the output as a mask, you may need to convert the IMAGE to a MASK depending on what consumes it; a solid black/white image is the right starting point either way.
The bigger thing is that Draw Shape lives in the Graphics group, which is the part of Comfyroll most likely to fail on load. If it's missing, your log shows Comfyroll Studio: Failed to load Graphics nodes ending in NameError: name 'CR_HalftoneGrid' is not defined. That NameError is a symptom - the real cause is an import error higher up, nearly always an incompatible Pillow (PIL) version dragged in by some other custom node, which can knock out the whole pack. Scroll up to the first traceback and reinstall Pillow (pip install --upgrade --force-reinstall pillow) into ComfyUI's Python, then restart.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51264β4096 | β |
| height | INT | 51264β4096 | β |
| shape | COMBO | 14 options: circle, oval, square, diamond, triangle, hexagon, +8 | |
| shape_color | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| back_color | COMBO | 30 options: custom, white, black, red, green, blue, +24 | |
| x_offset | INT | 0-2048β2048 | β |
| y_offset | INT | 0-2048β2048 | β |
| zoom | FLOAT | 1.000β10 | β |
| rotation | FLOAT | 0.00β3600 | β |
| shape_color_hexopt | STRING | #000000 | β |
| bg_color_hexopt | STRING | #000000 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| show_help | STRING | β |