Nodes/TrentNodes/MiniMax H3 Resize
ComfyUI Node

MiniMax H3 Resize

The H3-native size presets, so you never guess the resolution

By TrentHunter82·Created 9 months ago·Updated 4 days ago· 36
MiniMax H3 Resize
  • image
  • image
  • width
  • height
size1.0 MP - 1376x768
upscale_methodlanczos
cropcenter
orientationlandscape

MiniMax H3 has a published set of output resolutions - 0.2 MP up to 2.0 MP, all 16:9, all multiples of 32. If you feed it a random resolution it can still choke or silently downscale. MiniMax H3 Resize is the node that makes "what size do I render at?" a one-click answer: it resizes your image to one of the exact official H3 output sizes and hands you the width and height as INTs for wiring into the rest of your graph.

This is the boring-but-essential glue for an H3 pipeline. The size dropdown is the entire point - fourteen presets taken from H3's own size settings reference, from 0.2 MP - 608x352 up to 2.0 MP - 1920x1088, with the megapixel label and resolution both in the option text so you know what you're picking.

Inputs

  • image - the image (or first frame) to resize.
  • size - the H3 target, default 1.0 MP - 1376x768.
  • upscale_method - lanczos (default), bicubic, bilinear, area, or nearest-exact. Lanczos is the right default for downscaling into a video pipeline; area is the mathematically "correct" downscale if you're picky.
  • crop - center crops to the target aspect before resizing (no distortion), disabled stretches to fit. Default center, and it's the one you want unless your source is already 16:9.
  • orientation - landscape uses the sizes as listed (16:9); portrait swaps width and height for 9:16 vertical video.

Outputs

image (the resized frame), plus width and height as INTs. The INTs are the quietly useful part - H3's prompt format and sampler wiring often want the dimensions as numbers, and having them as actual outputs means you never hardcode a resolution that drifts out of sync with the resize.

Install

Ships in TrentNodes:

cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt

Restart, find it under Trent/Image. Uses ComfyUI's own common_upscale, so no extra dependencies beyond the pack.

Gotchas

Two things. First, all sizes are multiples of 32 and 16:9 (or 9:16 in portrait) - if your target isn't one of the presets, this node isn't the tool; use a general resize and accept the H3 constraint on the next step. Second, crop: disabled will distort your image to fit - the tooltip warns "no distortion" on center for a reason. If you crop a 1:1 source to 16:9, you're losing vertical content; that's the deal, not a bug. For most reference-image workflows, center-crop then let H3's own VAE do its thing is the pragmatic path.

CategoryTrent/Image

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
sizeCOMBO1.0 MP - 1376x768Target H3 output size (megapixels - WxH).
upscale_methodCOMBOlanczos5 options: lanczos, bicubic, bilinear, area, nearest-exact
cropCOMBOcentercenter: crop to the target aspect before the resize (no distortion). disabled: stretch to fit.
orientationCOMBOlandscapelandscape: use the size as listed (16:9). portrait: swap width and height (9:16).

Outputs (3)

NameTypeDescription
imageIMAGE
widthINT
heightINT