DIGIT Frame Size
Stop doing aspect-ratio math in your head
- width
- height
- megapixels
- size_string
Every ComfyUI user has a "what resolution is 2.39:1 at 2K anyway?" moment. This node is the answer to that question, pre-solved: pick a preset from a dropdown and it hands you the width, the height, the megapixels, and a ready-to-paste WIDTHxHEIGHT string. It's a pure utility node - no API, no model, no cost - but it quietly kills one of the most annoying little chores in building a workflow.
The pitch is specifically for people who jump between aspect ratios for a living - video work where 16:9, 9:16, and 21:9 all live in the same project. Instead of typing 2560x1440 from memory or opening a calculator, you pick "HD 16:9" and the numbers come out the other side as clean INTs you can feed anywhere.
How it works
There are 46 presets organized by size tier - Large / Medium / Small - and then by aspect ratio. The lineup covers square 1:1, photo 4:5 and 5:4, standard 4:3 and 3:4, classic 3:2 and 2:3, HD 16:9 and 9:16 (up to 4K), ultrawide 21:9, anamorphic 2.39:1, IMAX 1.43:1, and SD 480p. Each preset maps to an exact pixel size.
The inputs:
- preset - the dropdown. The default is "HD 16:9 - 1920×1080".
- width_override / height_override - optional. Set either to a non-zero value and it overrides the preset on that axis. Handy when you want the preset's shape but a specific edge.
The outputs are four different views of the same answer:
- width and height - INTs, the actual pixels.
- megapixels - FLOAT, width × height / 1,000,000. Useful when you're budgeting against a model's resolution limits.
- size_string - a
1920x1080string, ready to pipe into nodes that want a resolution as text.
Where it shines is wiring: feed width and height into an Empty Latent Image or an image-generation node's size inputs and every aspect ratio change is one dropdown click instead of two typed numbers.
Install
Part of the comfyui-digit pack (53 nodes, so installing gets you the whole family). ComfyUI Manager → search comfyui-digit → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/thedepartmentofexternalservices/comfyui-digit.git
cd comfyui-digit
pip install -r requirements.txt
Restart ComfyUI, look under the DIGIT category.
Common issues
There's very little to break here because there's no mechanism to break - it's a lookup table. The one habit worth forming: when you use width_override or height_override, remember it overrides just that axis, so a preset plus a width override gives you a size the preset didn't promise. That's by design, but it's easy to glance at the preset name later and forget the override is sitting there.
If a downstream node rejects the resolution, check whether it wants multiples of 8 or 16 - the presets are sized to standard model-friendly values, but if you've overridden, it's on you to keep the math friendly. One more practical note: the pack's other generation nodes (Gemini Image, GPT Image, and friends) pick their own aspect ratios from their own dropdowns, so this node earns its keep mostly with local pipelines and Empty Latent Image setups, not the cloud gen nodes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | HD 16:9 — 1920×1080 | 46 options: — Large —, Square 1:1 — 2048×2048, Square 1:1 — 2560×2560, Photo 4:5 — 2048×2560, Photo 5:4 — 2560×2048, Standard 4:3 — 2560×1920, +40 |
| width_overrideopt | INT | 00–16384 | If non-zero, overrides the preset width. |
| height_overrideopt | INT | 00–16384 | If non-zero, overrides the preset height. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width | INT | Frame width in pixels. |
| height | INT | Frame height in pixels. |
| megapixels | FLOAT | Total megapixels (width × height / 1,000,000). |
| size_string | STRING | WIDTHxHEIGHT string for display or piping. |