Nodes/comfyui-mini-nodes/mini_resolution
ComfyUI Node

mini_resolution

A latent-size preset picker that spits out two clean integers

By catmaxzj·Created 4 months ago·Updated 2 days ago· 28
mini_resolution
    • 宽度 (Width)
    • 高度 (Height)
    选择预设尺寸图像分辨率/1:1 标准方形 | 1024×1024 (1.0M 标清方形)
    启用自定义尺寸false
    自定义宽度1024
    自定义高度1024

    Every workflow needs a resolution, and typing it into an EmptyLatentImage widget by hand is how you end up with 1792×2048 (works) next to 1800×2048 (shape error, ten minutes of head-scratching). mini_resolution is the tiny quality-of-life node that makes the choice a dropdown instead of a number you have to get lucky on. It was originally called "Latent Size," renamed to mini_resolution in v1.0.3 - same behavior, clearer name. If you load an old workflow and see a missing "Latent Size" node, this is what replaced it.

    It does exactly one thing: it outputs a width and a height as two INTs, ready to wire into an EmptyLatentImage (or any latent/empty-image node that takes separate W and H). Nothing more, nothing less.

    Why resolution is a minefield

    It helps to know why this node exists at all. The latent space your model works in isn't universal - different model families compress pixels differently. Older SD1/SDXL-class models run a 4-channel VAE; FLUX.1, Qwen-Image, WAN, and SD3 run 16-channel; the newest ERNIE/FLUX.2-class generation runs 128-channel. The practical rule is that latent dimensions want to be multiples of 8 (and some models are pickier than that), and total pixel count wants to sit near what the model was trained on - roughly a megapixel for the modern image models. Wrong resolution doesn't give you a subtly worse image; it gives you a "Dimension Mismatch" / "Shape Error" and a dead queue. This node keeps you inside the sensible lanes.

    The inputs that matter

    • 选择预设尺寸 (select preset) - the 33-entry enum. Presets are grouped by aspect ratio (1:1, 3:4, 4:3, 2:3, 3:2), each with a ~1.0M "standard," ~1.4–1.6M "HD," and ~2.0M "ultra" tier. There's a dedicated Qwen-Image section using its lower-offset resolutions (1008×1008, 1176×1176, etc. - the ones that keep Qwen from drifting), plus a video section covering 16:9-ish and portrait frame sizes from 480p preview up to 1080p.
    • 启用自定义尺寸 (enable custom size) - boolean, default false. Flip it on to ignore the preset and enter your own.
    • 自定义宽度 / 自定义高度 (custom width/height) - INT, 64 to 8192, stepped by 8. The step of 8 keeps you latent-safe by construction.

    Outputs are 宽度 (Width) and 高度 (Height), both INT. Wire them into the width/height inputs of EmptyLatentImage, or any node with matching integer inputs. Since it's just two numbers, you can also feed the same pair into multiple latent nodes at once - set your generation resolution once, and every stage of the workflow reads the same values.

    One thing to know: some of the older README screenshots show an "architecture channels" selector (4/16/128-channel). The shipped node doesn't have that - it's purely a resolution preset picker, and the presets themselves do the channel-appropriateness work. Don't go hunting for a channel input that isn't there.

    Install

    ComfyUI Manager → search "comfyui-mini-nodes" → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/catmaxzj/comfyui-mini-nodes
    

    Restart, done. It's a pure-python node - torch, numpy, nothing exotic - so there are no extra dependencies and no model files.

    Gotchas

    • The input labels are Chinese: 选择预设尺寸 = select preset, 启用自定义尺寸 = enable custom size. You'll be fine after one look.
    • If your model is Flux or Qwen, don't reach for the SD-era 1024×1024 default out of habit; the model-specific preset sections exist because those families have resolutions they actually like. When an image looks "off" or the model drifts, the resolution choice is often the first thing to recheck.
    • It outputs numbers, not latents. If you wire it somewhere expecting an IMAGE or LATENT, you'll get a type mismatch - this node is purely the "what size" decision, the empty-latent node is the "make it" step.
    Categorymini_nodes

    Inputs (4)

    NameTypeDefaultDescription
    选择预设尺寸COMBO图像分辨率/1:1 标准方形 | 1024×1024 (1.0M 标清方形)33 options: 图像分辨率/1:1 标准方形 | 1024×1024 (1.0M 标清方形), 图像分辨率/1:1 标准方形 | 1152×1152 (1.3M 高清方形), 图像分辨率/1:1 标准方形 | 1280×1280 (1.6M 超清方形), 图像分辨率/3:4 经典杂志 (竖) | 896×1152 (1.0M 标清肖像), 图像分辨率/3:4 经典杂志 (竖) | 1024×1344 (1.4M 高清肖像), 图像分辨率/3:4 经典杂志 (竖) | 1152×1472 (1.7M 超清肖像), +27
    启用自定义尺寸BOOLEANfalse
    自定义宽度INT102464–8192
    自定义高度INT102464–8192

    Outputs (2)

    NameTypeDescription
    宽度 (Width)INT
    高度 (Height)INT