MiniMax H3 Region Picker
Drag a rectangle on your MiniMax H3 clip instead of typing percentages
- images
- video
- x_pct
- y_pct
- w_pct
- h_pct
- preview
Guessing x_pct, y_pct, w_pct and h_pct for a video frame by eye is misery. Is the logo's bottom edge at 62% or 66%? Nobody can tell. This node puts one frame on the node body and lets you drag a rectangle over it, updating the four percentage widgets as you go. That's the whole job, and it does it without pretending to be anything cleverer.
How it works
MiniMaxH3RegionPicker is an output node that returns a preview image. Run the graph once and ComfyUI has the frame in the node's own image slot; a small JavaScript extension (region_picker.js, which ships in the pack's web/js) draws that frame inside the node body and overlays the current rectangle. Drag to move it, use the handle to resize it.
The architectural detail worth knowing: the widgets are the source of truth, not the drag. Dragging just writes x_pct/y_pct/w_pct/h_pct into the normal widgets, so everything is saved with the workflow like any other widget value - you can close the workflow, reopen it next week, and the rectangle is still there. No hidden state that only exists while the browser tab is open.
It can pull the frame from either of two places:
images- a decoded clip (anIMAGEbatch from VAE decode or any loader).video- aVIDEOstraight fromLoadVideo. This is the nice path for a cut-rewrite workflow: the picker sits next to the video loader and reads a frame in the browser without you decoding the whole clip just to choose a rectangle.
The frame widget picks which frame to look at. Percentages don't depend on it - it only changes what you're looking at.
Outputs
x_pct,y_pct,w_pct,h_pct- wire these four floats straight into the Partial Denoise Mask's rectangle inputs and you can't mistype a number.preview- the frame with the rectangle burned in (the outline is drawn server-side, orange, so it works even with the JavaScript half missing). If the drag UI ever breaks after a ComfyUI update, this output is your fallback: type numbers in, check the burn-in, done.
One workflow note: because this is an output node it sits on the canvas as a terminal, and it needs the frame in node.imgs before you can drag - which means running the graph once first. That's a mild inconvenience on a 40-minute clip, but the values persist afterwards, so it's a one-time cost per workflow.
Install
ComfyUI Manager, search MiniMax H3 Inpaint Tools - that installs the whole ten-node pack and its minimax-h3-latent-core dependency. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/panghea/ComfyUI-MiniMax-H3-Inpaint-Tools
cd ComfyUI-MiniMax-H3-Inpaint-Tools && pip install -r requirements.txt
Restart (you need the browser half reloaded, not just the Python half, so a full restart matters here) and it appears under MiniMax H3/latent. If you installed from a registry package rather than a git clone, check the JavaScript half is present - it lives in the repo's web/js and only ships with the full checkout.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| frame | INT | 00–100000 | Which frame to show. Percentages do not depend on it - it only changes what you are looking at. |
| x_pct | FLOAT | 25.00–100 | — |
| y_pct | FLOAT | 25.00–100 | — |
| w_pct | FLOAT | 50.00–100 | — |
| h_pct | FLOAT | 50.00–100 | — |
| imagesopt | IMAGE | A decoded clip, or any image batch. | |
| videoopt | VIDEO | A VIDEO straight from LoadVideo - saves having to decode the clip just to pick a rectangle. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| x_pct | FLOAT | — |
| y_pct | FLOAT | — |
| w_pct | FLOAT | — |
| h_pct | FLOAT | — |
| preview | IMAGE | — |