Nodes/comfyui-ig1-tools/Resolution Properties
ComfyUI Node

Resolution Properties

Unpacking a resolution into numbers you can actually use

By iguanesolutions·Created 12 months ago·Updated 9 months ago· 4
Resolution Properties
  • resolution
  • WIDTH
  • HEIGHT
  • MEGAPIXELS
  • ASPECT_RATIO

Resolution Properties is the inverse of the pack's Resolution node. Where that one bundles a width and height into a single IG1_RESOLUTION value, this one takes the bundle back apart and hands you the pieces: width, height, megapixels, and an aspect ratio. Same idea as unzipping a file - the pack's whole design is built around resolutions and ratios traveling as one wire, and this node is the bridge back out into the plain-INT world.

You reach for it the moment a resolution stops being a value you pass around and becomes a value you have to act on. Want to feed a width and height into a KSampler or Empty Latent? That's this node's outputs, not the bundle itself. Want to branch your workflow depending on the aspect ratio? Also this node. It's the conversion step in any IG1 pipeline that actually generates something.

The four outputs

One input - resolution (an IG1_RESOLUTION) - and four outputs:

  • WIDTH - INT, the resolution width
  • HEIGHT - INT, the resolution height
  • MEGAPIXELS - FLOAT, total pixel count in megapixels, rounded to 2 decimals
  • ASPECT_RATIO - an IG1_ASPECTRATIO value, ready for further processing

The one beginners sleep on is MEGAPIXELS. It's just width × height / 1,000,000 rounded to two decimals, but it's the single most useful number in a high-res workflow, because it's how you sanity-check a target against what a model can actually do. A 4K frame like 3840×2160 is 8.29MP - miles beyond any diffusion model's training size, which is exactly why the Advisor node in this pack keeps telling you to generate at ~1MP and upscale from there. See the upscaling literature on hi-res fix for the underlying pattern: generate at native resolution, then grow with a second pass at low denoise.

ASPECT_RATIO is worth a heads-up: it's another custom type, not a float. If you want the raw ratio as a number - say, to compare against a threshold in a conditional node - feed it into the pack's Aspect Ratio Properties node, which turns it into numerator, denominator, and a plain float value. So the full chain in a working pipeline usually reads: ResolutionResolution PropertiesAspect Ratio Properties.

Gotchas

  • MEGAPIXELS is not a "native resolution" stamp. It's pure arithmetic about your target; it tells you nothing about whether your model likes that size. Pair it with the Advisor's recommendation rather than trusting it alone.
  • The ASPECT_RATIO output won't plug into an INT or FLOAT input - custom types only connect to custom-type pins. If a wire snaps back at you here, it's working as designed.
  • Don't double-unpack. Once a resolution is bundled, feeding it back through Resolution isn't a thing - Resolution expects raw width/height INTs.

Install

Part of the IG1 Tools pack ("Flux Resolution" in ComfyUI Manager). Install via Manager's "Install via Git URL" - https://github.com/iguanesolutions/comfyui-ig1-tools.git - or git clone it into ComfyUI/custom_nodes and restart. No model downloads, no heavy dependencies; the requirements list (requests, aiohttp, torch, numpy, Pillow) is satisfied by a stock ComfyUI already. If the nodes don't appear, restart ComfyUI and make sure it's reasonably current - the pack uses the newer comfy_api node framework.

CategoryIG1 Tools

Inputs (1)

NameTypeDefaultDescription
resolutionIG1_RESOLUTIONThe resolution to extract properties from

Outputs (4)

NameTypeDescription
WIDTHINTThe resolution width
HEIGHTINTThe resolution height
MEGAPIXELSFLOATThe resolution size in megapixels (rounded to 2 decimals)
ASPECT_RATIOIG1_ASPECTRATIOThe resolution aspect ratio