SDXL Resolution Matcher MXD
SDXL resolution, matched for you
- image
- resolution
- vertical
SDXL is trained at a fixed set of aspect ratios around 1024×1024 - the pack's empty-latent node lists the canonical five: 1:1, 4:3, 3:2, 16:9, and 21:9. Run img2img at some off-preset size like 1034×762 and you're paying a quality tax the model never saw in training. SDXL Resolution Matcher MXD does the thing you should be doing manually every time: look at your input image, find the closest valid SDXL preset, and hand back the exact preset string - so you can feed it straight into the matching empty-latent node and regenerate at a resolution SDXL actually likes.
What it does
One input (image), two outputs:
resolution- an enum string likeWidescreen (16:9) 1344x768(one of the five presets)vertical- a boolean for portrait orientation (height > width)
The matching logic is honest and simple: it compares the image's aspect ratio to each preset's aspect ratio, picks the closest, then within that group picks the preset whose area is closest to your image's area. Tall image → it picks a landscape-ish preset, then flips the vertical flag so the dimensions get swapped. That's the key detail: you get both halves of the answer, because orientation is as important as the preset itself.
The wiring trick
Because the resolution output is an enum of the exact same list that Sdxl Empty Latent Image MXD (the pack's empty latent node) uses as its dropdown, you can literally wire resolution into that node's resolution input and vertical into its vertical input. Drag in any reference image, and the latent is created at a model-safe resolution that matches it - no typing, no remembering which 4:3 size goes with which 16:9 size.
This pattern is the pack's whole vibe: "resolution presets plus vertical toggle to avoid retyping the same sizes repeatedly," per the README. The matcher is the half that does the thinking.
When it's worth it
Anytime you're doing img2img, IP-Adapter conditioning, or any workflow where a reference image's size drives the generation canvas. The KB's SDXL guidance is clear that stray resolutions are where anatomy and composition start to fall apart; matching the preset keeps you in the model's happy zone. It's a tiny node that removes a constant, nagging source of "why does this look slightly off."
Install
ComfyUI Manager → search Maxed Out → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut
No requirements.txt, no model downloads. Under MXD/Latent. If you've ever stared at a reference image trying to remember whether it's closer to 1216×832 or 1344×768, this node retires that question permanently.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| resolution | Square (1:1) 1024x1024,Standard (4:3) 1152x896,Landscape (3:2) 1216x832,Widescreen (16:9) 1344x768,Ultra-Wide (21:9) 1536x640 | — |
| vertical | BOOLEAN | — |