JZL - 🌊 海螺H3视频参数
The resolution calculator that does H3's grid math so you don't have to
- Width
- Height
- Frames
- 参考图放大系数
"JZL - 🌊 海螺H3视频参数" is a pocket calculator, not a generator - and that's exactly what makes it useful. MiniMax H3 (the 33B open-weight omni-modal video model with native stereo audio) is picky about two numbers: the canvas has to land on a clean multiple, and the frame count has to sit on the model's temporal grid. Pick a vibe, and this node spits out the four numbers that keep ComfyUI from silently generating a broken or refused clip.
It comes from the JZL-MiniMax-H3 pack (wjluoxiao), a Chinese-first power-user pack built on top of ComfyUI's official H3 nodes. This particular node is a re-homing of the old XB_ToolBox XB_HailuoH3VideoParams, minus the frame-rate setting and output port, which makes sense: H3 is fixed at 24fps, so a fps knob was always a lie.
How it works
The resolution math is a straight clone of the official ResolutionSelector formula. You give it an aspect_ratio (ten presets from 1:1 to 21:9), a megapixels target (default 1.0, so roughly a 1344×768-class canvas), and a multiple to round to (default 32). It computes total pixels = megapixels × 1024², scales the aspect ratio to hit that area, then rounds width and height up to the multiple. That's why you can ask for 1.0MP 16:9 and get clean 1344×768 instead of a weird 1339×770.
duration is where H3's quirk lives. The model does 4–15 second clips, and the pack snaps the frame count to a 17k+5 grid - the temporal VAE was trained so frame counts land on 17 × k + 5 (124 ≈ 5s). So the node converts your seconds to 24fps and snaps. The front-end also links duration to the "剧本与镜头处理器" (Script Processor) node's per-segment duration, so changing one updates the other.
The inputs that matter
aspect_ratio- ten presets. Pick the story's shape.megapixels- the real resolution knob, 0.1–16. Keep it modest; H3's default tier is ~768p short edge.duration- 4–15 seconds, steps of 1.scale_factor- 1.0–5.0, the reference-image area multiplier. This is JZL's own extension for the "MiniMax H3 参考编码" node'sref_scale: 2.0 doubles the reference image's pixel area (not resolution) for stronger identity fidelity.
Outputs are Width, Height, Frames, and 参考图放大系数 (the reference scale factor). Wire Width/Height/Frames into a JZL_MiniMaxH3ReferenceToVideo or JZL_MiniMaxH3ImageToVideoDual, and feed the scale factor to its ref_scale input - that's the whole job.
How to install it
Install once for the whole pack - ComfyUI Manager, search "ComfyUI-JZL-MiniMax-H3", or:
cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/ComfyUI-JZL-MiniMax-H3
Restart ComfyUI. Dependencies are light for this node: torch and torchaudio (the pack lists imageio-ffmpeg as a fallback for video frame extraction, but a calculator like this never touches it). You do need a recent ComfyUI - the pack's io.Schema nodes require comfy_api.latest, the same version that ships the official MiniMax H3 nodes.
Common issues
The trap is forgetting that H3 itself needs a model. This node only computes numbers - you still load the ~42.5GB weights through ComfyUI's official H3 loaders, and those weights are geofenced by the MiniMax H3 Community License (no US, EU, UK, or South Korea for local runs). If your clip won't sample, double-check that Width/Height/Frames are actually flowing into an encoder node rather than a static KSampler expecting latent dimensions; H3's conditioning carries its own spatial layout.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 16:9 (Widescreen) | 10 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:5 (Portrait Tall), 4:3 (Standard), +4 |
| megapixels | FLOAT | 1.00.1–16 | — |
| multiple | INT | 328–128 | — |
| frames_display | STRING | Frames: 0 | — |
| duration | INT | 84–15 | 视频时长 (秒), MiniMax H3 支持 4–15 秒。与「剧本与镜头处理器」的每段视频时长联动 |
| scale_factor | FLOAT | 1.01–5 | 参考图放大系数 — 接入「MiniMax H3 参考编码」的参考值放大 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| Width | INT | — |
| Height | INT | — |
| Frames | INT | — |
| 参考图放大系数 | FLOAT | — |