Proportional Dimension (legacy)
The old key, same math, one save away from migrating
- from_image
- width
- height
- shortest_side
- longest_side
- scale
If you see "Proportional Dimension" in a node menu with "(legacy)" after it, you're looking at MoonPack v0.1's old registry key. The current version is registered as MoonPack_ProportionalDimension, and the legacy entry exists so workflows you saved before the v0.2 rename still load without you having to rebuild anything. Same node, same behavior, just an older name.
What it does (briefly)
It rescales a width/height pair proportionally so a chosen side lands on a target size, then snaps both dimensions to a divisor. Full details are on the MoonPack_ProportionalDimension page, but the inputs are the same: width, height, target_size, target_side (shortest/longest), orientation, divisible_by, rounding, and an optional from_image input that reads dimensions straight off an image tensor. Outputs are width, height, shortest_side, longest_side, and scale.
The short version of why it exists: models want dimensions in specific multiples, and doing that division in your head is how you end up with a 736-wide latent that SDXL quietly mangles. This node snaps the math for you.
Why the legacy name matters to you
MoonPack v0.2 (the MoonPack_ prefix release) kept the old ProportionalDimension key as an alias - but the README is explicit that aliases are a bridge, not a permanent state: they're kept for one release cycle and slated for removal in 1.0. So if your workflow still says ProportionalDimension, do this: load it, hit save once, and ComfyUI writes the graph back with MoonPack_ProportionalDimension in its place. That's the whole migration.
It's a one-time, two-click thing. The only way you get bitten is by never re-saving and then updating the pack past the alias's removal date.
Installing it
It's part of MoonPack, so:
cd ComfyUI/custom_nodes
git clone https://github.com/moonwhaler/comfyui-moonpack.git
or ComfyUI Manager → MoonPack, then restart. Under MoonPack/image. No model downloads, no third-party Python dependencies - clean install.
Bottom line
The "(legacy)" is cosmetic; the math underneath is current. Use it if it's already in your workflow, but give it the one re-save now so the next pack update doesn't leave your graph pointing at a key that no longer exists.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 14401–16384 | Original width in pixels. |
| height | INT | 10241–16384 | Original height in pixels. |
| target_size | INT | 4801–16384 | Desired size for the selected side. Only used when resize_mode is 'target_side'. |
| target_side | COMBO | shortest | Which side target_size applies to. 'shortest' upscales the smaller side; 'longest' caps the larger side. Only used when resize_mode is 'target_side'. |
| orientation | COMBO | auto | Force output orientation. 'auto' keeps source orientation. 'landscape'/'portrait' swap width/height when source doesn't match. 'square' produces target_size x target_size (ignores target_side). |
| divisible_by | INT | 11–1024 | Snap output dimensions to a multiple of this value (1 = no snapping). |
| rounding | COMBO | nearest | How to snap to the divisor. 'floor' guarantees output ≤ ideal; 'ceil' guarantees ≥. |
| resize_mode | COMBO | target_side | 'target_side' uses target_size/target_side above. 'megapixels' uses the megapixels field instead and ignores target_size/target_side. |
| megapixels | FLOAT | 1.000.01–100 | Target total megapixels (width x height / 1e6), aspect ratio preserved. Only used when resize_mode is 'megapixels'. |
| from_imageopt | IMAGE | Optional: read width/height from an IMAGE tensor instead of the widgets. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| shortest_side | INT | — |
| longest_side | INT | — |
| scale | FLOAT | — |