LLS Simple Mask Create
Draw a rectangle, circle, or ellipse mask from numbers — no painting required
- input_mask
- mask_image
- mask
- area_info
Sometimes you don't need to paint a mask - you need a clean geometric region, positioned precisely, at a size that's easy to reason about. LLS Simple Mask Create is the "give me a rectangle over the center 30%" node. You feed it the output image size and a few shape parameters, and it returns a mask, a visualizable black-and-white mask_image, and a bundle of diagnostics.
The default is genuinely useful: a rectangle centered on the canvas, covering 30% of the width and height - the classic "mask the middle of the image for a focused repair" starting point. shape_type gives you rectangle, square, circle, or ellipse. coordinate_mode flips between pixel and percent, so you can position in absolute pixels or relative fractions (percent mode with center_x/center_y at 0.5 is the sane default).
The knobs that matter
image_width/image_height- the mask's canvas size (should match your generation target).center_x/center_y- where the shape sits.width/height- shape size (percent or pixels, depending oncoordinate_mode);radiusfor circles.feather/blur- soften edges so the masked region blends instead of showing a hard boundary.invert_mask- flip it (protect the center, edit everything else).combine_mode- if you connect an optionalinput_mask, this decides whether the geometric shapereplaces,unions,subtracts, orintersects the existing mask.
The area_info output is the sleeper: a structured payload with the bbox, area in pixels, area ratio, and which geometry was used. For a beginner it's mostly "oh good, my mask actually covers 30% of the image"; for automation it's the ground truth about what you're about to regenerate.
Outputs
mask (white = will be redrawn, black = untouched), mask_image (the mask rendered as a viewable image - wire it into a Preview Image so you can actually see what you made), and area_info.
Where it fits
The pack's recommended repair flow wires it straight into the chain: mask → LLS Simple Repair Prepare, or mask → LLS Simple Mask Draw to hand-tune the geometric shape afterward. It's also a fine standalone for "delete this region" masking. Preview the mask_image output before you run a sampler - a mask you can't see is a mask you can't trust.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Gin3601/LLS-node
# restart ComfyUI
Or ComfyUI Manager → search "LLS-node". No dependencies beyond torch.
Gotchas
The shape can extend past the canvas - the area_info includes clipped_by_image so you can tell when it has - and shapes clipped at the edge behave as you'd expect (they just get cut off, not error). Defaults assume percent mode, so if you switch to pixel mode, remember your center_x/y and sizes change meaning. And a circle's radius default (0.15 in percent mode) is intentionally small - bump it before you wonder why your "circle" covers barely anything.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image_width | INT | 10241–8192 | — |
| image_height | INT | 10241–8192 | — |
| shape_type | COMBO | rectangle | 4 options: rectangle, square, circle, ellipse |
| coordinate_mode | COMBO | percent | 2 options: pixel, percent |
| center_x | FLOAT | 0.50 | — |
| center_y | FLOAT | 0.50 | — |
| width | FLOAT | 0.300–8192 | — |
| height | FLOAT | 0.300–8192 | — |
| radius | FLOAT | 0.150–8192 | — |
| feather | FLOAT | 0.00–128 | — |
| blur | FLOAT | 0.00–128 | — |
| invert_mask | BOOLEAN | false | — |
| combine_mode | COMBO | replace | 4 options: replace, union, subtract, intersect |
| input_maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mask_image | IMAGE | — |
| mask | MASK | — |
| area_info | LLS_MASK_INFO | — |