MiniMax H3 Resolution Selector (ZeroHackz)
Stop hand-typing MiniMax H3's resolution and frame count
- width
- height
- length
If you've built a MiniMax H3 image-to-video workflow, you've met the annoyance this node exists to delete. ComfyUI's MiniMaxH3ImageToVideo wants width, height and a frame length, and those three numbers follow two rules that are easy to get wrong and silent when you do: both canvas dimensions have to be multiples of 32, and the frame count has to land on H3's "17k+5" lattice. H3 runs at 24 fps, and its valid frame counts sit on a grid where n % 17 == 5 - 107, 124, 141… Type 120 for a five-second clip and you're off-grid, usually without any error telling you so.
The MiniMax H3 Resolution Selector (ZeroHackz) turns all of that into a megapixels dropdown, an orientation dropdown and a seconds field. It never calls an API, needs no key, and doesn't even load the model - it's a tiny piece of value plumbing that spits out three integers that obey the rules so you don't have to remember them. ZeroHackz is a small solo pack (MIT, pure Python, no dependencies), so set expectations: this is a convenience widget, not magic. It saves you from silently corrupted frame counts, which is genuinely the kind of bug that eats an afternoon.
How it works
Peek inside nodes.py and it's refreshingly boring. The resolution tiers live in a hardcoded dict - 14 options from 0.2 (608x352) up to 2.0 (1920x1088), every one 16:9 and a multiple of 32. landscape hands those through as-is; portrait just swaps width and height, so 0.4 MP becomes 480×864. Then length is computed as duration × 24 and snapped upward until it hits the grid:
def snap_frames(n):
while n % 17 != 5:
n += 1
return n
That's the whole trick. One consequence worth knowing: your nominal seconds aren't exact. Pick 5 seconds and you get 120 → snapped to 124 frames, about 5.2 real seconds at 24 fps. That's by design, not a bug - MiniMax wants frame counts on that grid, so the node rounds you onto it and charges the extra frames.
The three widgets, and what comes out
The whole interface is three fields:
- megapixels - 14 tiers, labeled with the actual resolution (
0.4 (864x480)is the default). This is the one you'll touch most. - orientation -
landscapeorportrait; swaps width and height. - duration - an integer 2–30, default 5. This is where the author's README and the code disagree: the widget lets you go to 30, but H3 natively specced for clips in the ~4–15 s range, so treat anything past ~15 as "pushing it and paying for it."
Outputs are exactly three INTs: width, height, and length (the frame count). Wire them into MiniMaxH3ImageToVideo.
The one real gotcha in the wiring: by default those are widgets on the video node, not input sockets, so a wire won't connect. Right-click MiniMaxH3ImageToVideo and choose Convert widget to input on its width, height and length fields first - the same "convert to input" mechanic that turns any baked-in widget into a socket. The pack's own example workflow does exactly this.
Install
It's not in ComfyUI-Manager's registry yet (the README says "once listed"), so a clone is the honest path:
cd ComfyUI/custom_nodes
git clone https://github.com/ZeroHackz/ComfyUI-ResolutionSelector
Then restart ComfyUI and look under the MiniMax H3/ZeroHackz category. There's nothing else to install - requirements.txt literally says no external dependencies, and the code only imports math, logging and torch, all of which ComfyUI already ships.
Don't mistake the pack for the model. This node is useless on its own: you still need the MiniMax H3 workflow installed (the VAE, CLIP projection and text-encoder checkpoints those nodes load are separate, multi-GB downloads), and note H3's community license geofences local weights out of the US, EU, UK and Korea. Clone this pack when you already have H3 running and just want the fiddly numbers handled.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| orientation | COMBO | landscape | 2 options: landscape, portrait |
| megapixels | COMBO | 0.4 (864x480) | 14 options: 0.2 (608x352), 0.3 (736x416), 0.4 (864x480), 0.5 (960x544), 0.6 (1056x608), 0.7 (1152x640), +8 |
| duration | INT | 52–30 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| length | INT | — |