ComfyUI Node

Resolution Board

A resolution node that knows your model's budget

By henjicc·Created 23 days ago·Updated 21 days ago· 1
Resolution Board
  • preset
  • image
  • width
  • height
◄modepreset►
◄profileqwen21►
◄width2048►
◄height2048►
◄megapixels4.2►
◄fittrue►
◄alignmentauto►

Two integers. That's the whole output of HenjiccResolutionBoard - Resolution Board, Henjicc/Image - width and height as INT sockets. It exists because those two integers are where beginners lose an hour: they type 2048×2048 into an empty latent, get a fried image or an OOM, and conclude the model is bad.

This node encodes what people eventually learn by failing. Dimensions get snapped to a grid, total pixels get capped per model family, an aspect ratio can be inherited from an image, and a preset can own the numbers so a whole workflow's canvas changes in one place.

What "model profile" actually means

Two profiles, and the difference is arithmetic, not vibes.

qwen21 (the default) snaps to a 32 grid, caps either side at 4096, and caps the whole canvas at 4.3 megapixels. Qwen-Image's architecture is happiest in that neighbourhood; 2048×2048 is 4.19 MP, which is why that's the default width and height rather than a rounder number.

general snaps to 8, allows up to 8192 per side, and permits 16.7 MP (2²⁴ pixels). That's your Flux/Klein/Z-Image/SDXL catch-all where the only real constraint is your VRAM.

alignment (auto, 2, 8, 16, 32) overrides the grid. On qwen21 it's combined with the profile grid via least common multiple, so choosing 16 silently stays on 32 - the stricter rule wins. On general it replaces the grid outright. auto means "profile default," and it's the right answer 95% of the time.

Modes, and the preset trap

mode is preset, custom or reference.

custom uses width × height directly. reference needs the optional image socket and scales that image's aspect ratio to fit megapixels - the way you make an output canvas match a source photo. preset is the legacy path, and here's the thing worth knowing: a connected, populated preset socket wins over every mode. The pack's Super Input emits a Preset size output (HENJICC_PRESET); wire it in and its dimensions take over, ignoring mode entirely. Unpopulated, it passes through and your manual settings apply. The mode dropdown is not the boss - the wire is.

Finally megapixels (0.001–64, default 4.2) is the budget, and fit decides what happens when you exceed it. With fit on - the default - oversized requests are scaled down proportionally to fit the budget and the grid. With it off, you get an error: "Sizing limit: 4096px, 4.3 MP". If you'd rather be told than silently second-guessed, turn fit off.

Wiring it

Two outputs: width and height. Right-click the width/height widgets on your empty-latent node, Convert widget to input, and wire these in. On newer frontends you can often drag straight off the widget to spawn the socket.

That's the entire integration, and it's why this node is worth a slot in every template: one board per workflow means changing canvas size is one edit, not four. Pair it with the pack's Super Input and the preset drives the canvas, the media panel drives the references, and nothing diverges.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/henjicc/ComfyUI-Henjicc.git ComfyUI-Henjicc
python -m pip install aiohttp av numpy Pillow

Manager: comfyui-henjicc, restart, refresh. No model required - the sizing math is pure arithmetic, so this node works the second the pack imports and makes a good install smoke test.

Gotchas

"Connect a reference image." You picked reference mode without wiring the image socket. Two ways to fix it, one of them obvious.

"Pixel budget is below the minimum aligned size." You set megapixels to something tiny like 0.001 while on qwen21, whose minimum aligned side is 32. The floor exists.

The output isn't validated against your sampler. The board knows the model family's limits, not your VRAM or your LoRA's training resolution. 4.3 MP on a 12 GB card with a big text encoder will still OOM, and a LoRA trained at 1024 will still look worse off-distribution. It removes arithmetic mistakes, not physics.

CategoryHenjicc/Image

Inputs (9)

NameTypeDefaultDescription
modeCOMBOpreset3 options: preset, custom, reference
profileCOMBOqwen212 options: qwen21, general
widthINT20488–8192—
heightINT20488–8192—
megapixelsFLOAT4.20.001–64—
fitBOOLEANtrue—
presetoptHENJICC_PRESET—
imageoptIMAGE—
alignmentoptCOMBOauto5 options: auto, 2, 8, 16, 32

Outputs (2)

NameTypeDescription
widthINT—
heightINT—