Nodes/utility-nodes/Model Size Selector
ComfyUI Node

Model Size Selector

Stop googling 'what resolution does this model want'

By stefanleuker·Created 6 months ago·Updated 6 months ago· 0
Model Size Selector
  • model
  • width
  • height
  • resolution
◄aspect_ratio▾►
◄orientation▾►
◄size▾►

The new models are picky about canvas size, and the tables are impossible to keep in your head. Qwen Image 2512's recommended 1:1 is 1328×1328, not the 1024×1024 you're used to. LTX Video wants 1216×704 at 16:9. WAN 2.2 barely has more than two sizes it likes. Every one of these READMEs carries its own resolution chart, and none of them match the one you memorized for SDXL. ModelSizeSelector is a preset picker for exactly those tables - you pick aspect, orientation, and size tier, and it hands you the width and height the model's author actually recommends.

How it works

It's a lookup, not a calculation. Same model_configs.py table as the pack's ModelLoader, one sizes entry per model. Give it the model (via the pack's ModelSelector node - same UN_MODEL wiring as ModelLoader), choose aspect_ratio from 1:1, 9:7, 4:3, 3:2, 16:9, 21:9, an orientation, and a size (small/medium/large), and it returns the width and height for that combination.

The interesting part is the fallback logic, because not every model has every cell filled. Qwen Image 2512 only defines medium for its four aspects. WAN 2.2 defines just 1:1 medium and 16:9 small/large. Pick something the model doesn't offer and it quietly walks a fallback chain - for aspects that's 16:9 → 4:3 → 3:2 → 1:1, for sizes it's medium → large → small - and uses whatever it lands on. Portrait just swaps width and height for anything non-square. All of that is printed to the console, not shown in the UI.

The gotcha to remember

The fallback is silent as far as your workflow is concerned. Select "large" on Qwen Image and you'll get 1328×1328 - the medium - not an error, not even a red border. If your outputs look smaller than you asked for, check the console line: 'large' not available for Qwen Image 2512 1:1, using medium. It's the single most likely source of "why is my image a different size than I set" confusion.

Outputs and where they go

  • width and height (INT) - wire into Empty Latent Image, a video latent node, or whatever sampler feeds your resolution.
  • resolution (STRING) - the same pair formatted as "1664×928". Handy for a prompt preview or a filename, and a genuinely nice touch for keeping the graph legible.

Three sockets, zero thinking. This is textbook node plumbing: it exists to stop you re-typing the same five resolution numbers into every node that wants them.

Installing it

Same pack as the loader. ComfyUI Manager, search "utility-nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/stefanleuker/utility-nodes

then restart. No dependencies beyond ComfyUI core, no model files required - the resolutions are baked into the pack itself.

The honest caveat

The table is the pack author's reading of each model's recommendations, hardcoded, and only five models are covered. If the model upstream changes its guidance, this node needs a pack update to reflect it. And if you live in SD/SDXL/Flux 1 land, there's nothing in here for you - every supported entry is a new-generation model. But for anyone juggling Qwen, Z-Image, LTX, or WAN, it's a fifteen-second convenience that saves you from opening a README for the twentieth time. I'd rather have it in the graph than not.

Categoryutils

Inputs (4)

NameTypeDefaultDescription
modelUN_MODEL—
aspect_ratioCOMBO6 options: 1:1, 9:7, 4:3, 3:2, 16:9, 21:9
orientationCOMBO2 options: landscape, portrait
sizeCOMBO3 options: small, medium, large

Outputs (3)

NameTypeDescription
widthINT—
heightINT—
resolutionSTRING—