MiniMax H3 Time Range (frames)
Stop guessing frame percentages — let the latent do the math
- samples
- video
- images
- t_start_pct
- t_end_pct
- length
- report
- preview
You think in frames. The MiniMax H3 Partial Denoise Mask takes percentages. Those two sentences are the entire reason this node exists, and if you've ever typed t_start_pct by hand you know how badly that conversion goes. The author's own story: a mask asked for 18% when the subject appeared at frame 22 of 107 (that's 20.6%), so the mask was still ramping up when she arrived and the first frames kept the old look. MiniMaxH3TimeRange does the division for you - and, more usefully, tells you what the mask will actually cover once it lands on the latent's much coarser time axis.
How it works
Every timing mistake in the project came from converting frames to percentages against the wrong reference. So this node refuses to guess: you feed it samples, the actual latent the mask will be built on, and it measures the time axis from the tensor itself. There's nothing to type in and nothing that can fall out of sync, because the latent is the single source of truth.
The latent's video tensor has T latent frames; the node converts that to rendered frames (one latent frame is about 3.3 rendered frames - a 107-frame clip holds T = 32). Your start_frame and end_frame are measured against that total, and end_frame is one past the last frame you want, Python-slice style.
The inputs and outputs
samples- the latent the mask will be built on. This is the load-bearing input.start_frame/end_frame- first frame to rewrite, and one past the last.video/images(optional) - used only for the thumbnails, so you can see which frames you're choosing. They have no say in the numbers.
Outputs are made to be wired straight into the mask node:
| Output | What it is |
|---|---|
| t_start_pct, t_end_pct | The percentages for the mask. |
| length | The clip length H3 will actually accept, snapped down to the nearest valid length. |
| report | Text explaining what the latent grid widened your selection to. |
| preview | Start and end frames side by side, labelled, so you can check your choice before you spend the sampling time. |
It's an output node, so the report also shows up in the node's text area before you commit to the run rather than being discovered in the output afterwards.
What the report is actually telling you
H3 only accepts clip lengths where length % 17 == 5. If your latent holds a frame count that isn't valid, the last few frames get dropped, and the report says so rather than letting you find out at the encoder. It also flags the sneaky case where the decoded clip has more frames than the latent holds - the number that matters is the latent's, and the report follows it.
Install
ComfyUI Manager, search MiniMax H3 Inpaint Tools, or:
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 and it appears under MiniMax H3/latent alongside the mask node it feeds. If the percentages still feel abstract, pair it with the Region Picker for the spatial half of the selection and you never hand-type a mask number again.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | The latent the mask will be built on. Its time axis is what the frame numbers are measured against - there is nothing to type in, and nothing that can fall out of sync. | |
| start_frame | INT | 00–100000 | First frame to rewrite. |
| end_frame | INT | 1070–100000 | One past the last frame to rewrite, like a Python slice. |
| videoopt | VIDEO | Only for the thumbnails - the clip being rewritten, so you can see which frames you are choosing. It has no say in the numbers. | |
| imagesopt | IMAGE | Same, if the frames are already decoded. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| t_start_pct | FLOAT | — |
| t_end_pct | FLOAT | — |
| length | INT | — |
| report | STRING | — |
| preview | IMAGE | — |