Region Select ✂️
Draw the boxes, keep the coordinates, skip the math
- image_override
- crop
- image
- region
- x
- y
- width
- height
- prompt
- crop_2
- prompt_2
- crop_3
- prompt_3
- crop_4
- prompt_4
- crop_5
- prompt_5
- crop_6
- prompt_6
- crop_7
- prompt_7
- crop_8
- prompt_8
Instruction-editing models ate most of what people used masks for. For "change the jacket," "remove the cup," "swap the background," you don't need a mask any more. The thing they still can't do is leave the rest of the frame alone: they take the whole image into context and emit a whole new image, so pixels nobody asked about come back close to identical rather than identical - and it compounds.
The fix that stuck is crop-and-stitch. Cut the region out, run any model on just that crop, paste it back. Unmasked pixels never go through a VAE at all. Region Select is the front half of that pattern for people who want to point at things by hand and give each one its own sentence.
What it actually does
The node does no sampling. Its run method loads an image, walks up to eight rectangles, and slices each one out - that's the whole mechanism. Everything else is the interactive part: the pack ships a JS extension (js/region_selector.js) that adds a canvas widget to the node, draws the source image on it, and lets you drag numbered colored boxes around. Each box's {x, y, prompt} lives in a hidden regions_data string widget that the canvas writes to.
The clever bit is the third output, region. It's a bundle holding the original image plus every box's coordinates and prompt, and it's the only thing Region Stitch needs to put everything back. You never see or type a coordinate.
The inputs that matter
image_override- wire your IMAGE here. It takes priority over the node's internal file dropdown.image- a file picker over ComfyUI'sinputfolder, used only when nothing is connected.width/height- shared by all regions, default 1024, step 8, clamped to the source image.prompt- edits the selected region. Click a box in the preview to select it; the label above the canvas tells you which one you're editing.num_regions- 1 to 8. The+/−buttons and this widget are the same number, and adding regions grows the node's output list.
You can ignore regions_data entirely. It's hidden on purpose.
What comes out
crop plus crop_2 … crop_8, one image per region, each with a matching prompt_2 … prompt_8 string to feed your sampler's conditioning. Then image (the full source, handy for an A/B compare), region for Region Stitch, and x, y, width, height - which are region 1's only. The other seven sets of coordinates exist only inside the bundle.
Two behaviors worth knowing before they confuse you. Unused crop_i outputs emit an 8×8 black image, not an error - so if you leave crop_3 wired while num_regions is 2, you get a sampler happily generating from a black square. And unused prompt_i outputs come back as empty strings.
Install
ComfyUI Manager, search Momo Nodes. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Phykrex/ComfyUI-Momo-Nodes.git
Restart ComfyUI. There is nothing else to do: no requirements.txt, no model downloads. The package's pyproject.toml lists Pillow, torch and numpy, all of which ship with ComfyUI. Nodes land under MomoNodes/region. The pack is young (first commit September 2026), so if Manager's registry search comes up empty, use Install via Git URL with the same link.
Where people get burned
The preview doesn't need a run to refresh - there's a ⟳ button on the canvas toolbar that reloads from the connected or loaded image. But boxes are clamped: width/height are capped to the source image's real size, and each box's position is clamped so it can't hang off the edge. A box drawn partly outside the frame silently becomes a smaller box.
If you connect nothing and leave the dropdown empty, the run fails with Region Select: no internal image and no image_override connected. That's the node being honest, not a bug.
The real workflow cost is that regions don't batch. There is no "all eight crops as one batch" output; four regions means four crop → sampler → variant chains, and four variants arriving at Region Stitch. Eight full-resolution passes is a lot of VRAM, so keep the boxes tight.
And note the crop is exactly the box, with no surrounding context. When you're refining a small thing at native resolution, the padding rules for only-masked inpainting still apply - the model conditions better with some of the original around the target. Draw the box a little larger than the thing you actually want changed.
The pattern this feeds is Region Select → your sampler or edit model → Region Stitch → Save Image, with the region bundle riding alongside. Region Stitch is where the coordinates get spent.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Internal image. Used when no image is connected to image_override. | |
| width | INT | 102416–8192 | — |
| height | INT | 102416–8192 | — |
| prompt | STRING | Prompt for the selected region. Click a region box in the preview to edit its prompt. | |
| image_overrideopt | IMAGE | Connected image. Takes priority over the internal file. | |
| num_regionsopt | INT | 11–8 | How many regions are active. |
| regions_dataopt | STRING | [] | — |
Outputs (22)
| Name | Type | Description |
|---|---|---|
| crop | IMAGE | — |
| image | IMAGE | — |
| region | REGION | — |
| x | INT | — |
| y | INT | — |
| width | INT | — |
| height | INT | — |
| prompt | STRING | — |
| crop_2 | IMAGE | — |
| prompt_2 | STRING | — |
| crop_3 | IMAGE | — |
| prompt_3 | STRING | — |
| crop_4 | IMAGE | — |
| prompt_4 | STRING | — |
| crop_5 | IMAGE | — |
| prompt_5 | STRING | — |
| crop_6 | IMAGE | — |
| prompt_6 | STRING | — |
| crop_7 | IMAGE | — |
| prompt_7 | STRING | — |
| crop_8 | IMAGE | — |
| prompt_8 | STRING | — |