ComfyUI Node
Proportional Dimension (legacy)
Resizes width/height proportionally so the chosen side hits target_size, snapping to a multiple via nearest/floor/ceil rounding.
Proportional Dimension (legacy)
- from_image
- width
- height
- shortest_side
- longest_side
- scale
◄width1440►
◄height1024►
◄target_size480►
◄target_sideshortest►
◄orientationauto►
◄divisible_by1►
◄roundingnearest►
CategoryMoonPack/image
Inputs (8)
| 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. |
| target_side | COMBO | shortest | Which side target_size applies to. 'shortest' upscales the smaller side; 'longest' caps the larger 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 ≥. |
| 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 | — |