DimensionProviderRatio modusCell
The dropdown that keeps your SDXL honest
- ratio_width
- ratio_height
DimensionProviderRatio modusCell is the safer sibling in the Preset Dimensions pack. Instead of free-typing a resolution, you pick one from a dropdown of 13 known-good sizes, and the node hands you clean width and height integers to feed your workflow. It's a training-wheel node in the best sense: it stops you from generating at a resolution your model was never trained on.
Why the presets are what they are
This is the part that earns the node a place in your graph. Those 13 choices aren't random: they're literally the aspect-ratio buckets SD 1.5 and SDXL were trained on. 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640 - those are SDXL's documented native ratios and their rotations, plus the 512-based set for SD 1.5 and a 1280x720 for the 16:9 crowd.
Why should that matter to you? Because generating off your model's native resolution is one of the most common causes of "why is this picture broken?" - double heads, stretched limbs, repeated patterns. The classic framing from the community: "You are using a model trained on 1024x1024 images trying to make images with ridiculously different aspect ratios." This node just makes the correct answer the default. Pick 1216x832 for a portrait-ish SDXL render, generate clean, upscale after.
How it works
One dropdown in, two integers out. The code splits the selected string on the "x" and returns the two numbers - the extra lookup list in the source is dead weight that never affects the result. Outputs are ratio_width and ratio_height, both INT. Pure computation, no model files, no dependencies; the whole pack ships an empty requirements.txt and hasn't been updated since its single December 2023 commit. It's MIT-licensed and, like its free-form sibling DimensionProviderFree, appears in the menu under its full class name with the modusCell suffix.
What you'd wire it into
Same pattern as DimensionProviderFree, just safer: the INT outputs feed an Empty Latent Image, and from there into whatever else needs to agree on size - latent upscales, ControlNet preprocessors, a resize. The one-input workflow is genuinely nicer to read than three separate width/height widgets floating around the graph. Change the dropdown once, everything follows.
One thing to know before you buy in: these presets were designed for the SDXL era. The 2026 crop of models - Z-Image, Flux, Anima - is more forgiving, accepting a whole megapixel band with soft degradation instead of duplicated anatomy, and Flux wants multiples of 64. So the trained-ratio guardrail is most valuable when you're actually running SD 1.5 or SDXL. On a modern model you have more freedom, and this node becomes a convenience for consistency rather than a correctness check.
How to install
- ComfyUI Manager - search for Preset Dimensions and install.
- Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/modusCell/ComfyUI-dimension-node-modusCell
Restart ComfyUI and search "DimensionProviderRatio" in the node menu. Search the pack's Preset Dimensions name in ComfyUI Manager.
Common issues
The realistic pitfalls are mild. The presets are all multiples of 8, so latent-size errors aren't really on the table here - that's the whole point of the dropdown. Where people do get confused: expecting a third "custom" option, which doesn't exist; if you need an arbitrary size, that's DimensionProviderFree's job. And as with its sibling, the display-name overrides in the code point at the wrong keys, so the menu shows the raw class name. Cosmetic, not a bug. If you mostly run SDXL, this is the version of the pack worth keeping.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| dimension | COMBO | 13 options: 512 x 512, 512 x 768, 768 x 512, 1024 x 1024, 1152 x 896, 896 x 1152, +7 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| ratio_width | INT | — |
| ratio_height | INT | — |