Nodes/ComfyUI-MiniMax-H3-Image-Studio/MiniMax H3 Image • Advanced Resolution
ComfyUI Node

MiniMax H3 Image • Advanced Resolution

Sane H3 canvas sizes without doing the math

By astropuzzo·Created 22 days ago·Updated 6 days ago· 123
MiniMax H3 Image • Advanced Resolution
  • source_image
  • width
  • height
  • resolution_info
aspect_ratio
megapixels1.0
multiple32
native_area_captrue
custom_width2048
custom_height2048

H3 is picky about canvas sizes in a way SDXL users will find familiar: it wants dimensions on a grid, and it was trained around a native area. H3ImageResolution - "MiniMax H3 Image • Advanced Resolution" - is the calculator that spares you from staring at 1344×768 and wondering whether 1536×640 is legal. You hand it an aspect ratio and a target area, and it returns two integers you can wire straight into a prepare node.

What it computes

The mechanism is simple but deliberate. The node takes your target megapixels (using ComfyUI's convention where 1 MP = 1024²), fits that area to your chosen aspect ratio, and rounds both axes to a 32-pixel grid - 64 if you pick the multiple option. By default it also caps the total pixels near H3's native 768×1344 area, so asking for 4 megapixels at 1:1 doesn't silently produce a canvas the model was never trained to fill.

Inputs that matter

Inputs that matter:

  • aspect_ratio - source image (copies the ratio from a connected image), the preset ratios (1:1, 4:5, 3:4, 2:3, 9:16, 16:9, 3:2, 4:3, 21:9), or custom dimensions.
  • megapixels - your target area, 0.1 to 64.
  • native_area_cap - ON by default and you probably want it that way. It's the difference between a safe canvas and an experiment.
  • multiple - 32 or 64, the grid to round to.
  • custom_width/custom_height - used only when the ratio is custom dimensions.

Outputs are just width, height, and a resolution_info string that tells you what it computed, where the ratio came from, and whether you're inside or outside the native area. The info string is worth reading once, because the node is refreshingly blunt: disable the cap on an oversize canvas and it appends a warning that H3-Base is a 768p model and "direct oversize does not reproduce the unreleased H3-Regenerate-2K pipeline."

The honest take on megapixels

And that's the editorial position, really: start at the native area. The pack's own README says a 2 MP canvas can help small or distant details in some images but is "not a general quality upgrade" - it costs VRAM and runtime for a maybe. The native H3 canvas is roughly 1344×768, or about a megapixel, and that's where the model's learned detail lives.

If this node feels like more machinery than you need, the H3ImageResolutionPreset sibling gives you the same math with named profiles (native detail | 0.98 MP and friends). This one is for when you want the custom control - matching a source image's ratio, or chasing a specific megapixel target.

Install

Install is just the pack: ComfyUI Manager (search MiniMax H3 Image Studio) or git clone https://github.com/astropuzzo/ComfyUI-MiniMax-H3-Image-Studio.git into custom_nodes, then restart. No extra Python dependencies; it's pure canvas math, so it needs ComfyUI 0.30.0+ and the H3 models only when it's wired into a real workflow.

CategoryMiniMax H3/Image Studio

Inputs (7)

NameTypeDefaultDescription
aspect_ratioCOMBOCanvas aspect ratio. "source image" requires source_image; custom dimensions uses the custom_width/custom_height widgets.
megapixelsFLOAT1.00.1–64Target megapixels using ComfyUI's 1 MP = 1024² convention. Ignored for custom dimensions.
multipleCOMBO32Rounds both canvas axes to this H3-compatible grid multiple.
native_area_capBOOLEANtrueWhen enabled, caps total pixels near H3's native 768×1344 area while preserving the requested ratio.
custom_widthINT204832–16384Used only when aspect_ratio is "custom dimensions".
custom_heightINT204832–16384Used only when aspect_ratio is "custom dimensions".
source_imageoptIMAGERequired only when aspect_ratio is "source image".

Outputs (3)

NameTypeDescription
widthINTCalculated canvas width in pixels, rounded to the selected H3-compatible multiple.
heightINTCalculated canvas height in pixels, rounded to the selected H3-compatible multiple.
resolution_infoSTRINGHuman-readable size, aspect-ratio source, pixel-area and native-cap summary.