ComfyUI Node
Aspect Ratio to Size (Trim Margin)
A ComfyUI node in Info-Prompt-Toolkit/ImageInfo with 12 inputs and 4 outputs.
Aspect Ratio to Size (Trim Margin)
- width x height
- width
- height
- margin
◄width_ratio10►
◄height_ratio16►
◄min_unit32►
◄margin_top0►
◄margin_right0►
◄margin_bottom0►
◄margin_left0►
◄width864►
◄height1376►
◄actual_width864►
◄actual_height1376►
◄actual_ratio►
CategoryInfo-Prompt-Toolkit/ImageInfo
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| width_ratio | INT | 101–4096 | Aspect ratio width after trimming margins |
| height_ratio | INT | 161–4096 | Aspect ratio height after trimming margins |
| min_unit | COMBO | 32 | Minimum size step for the sampling size including margins |
| margin_top | INT | 00–16376 | Linked with margin_bottom; their total is 0 or min_unit |
| margin_right | INT | 00–16376 | Linked with margin_left; their total is 0 or min_unit |
| margin_bottom | INT | 00–16376 | Linked with margin_top; their total is 0 or min_unit |
| margin_left | INT | 00–16376 | Linked with margin_right; their total is 0 or min_unit |
| width | INT | 8648–16384 | Sampling width including margins (display only) |
| height | INT | 13768–16384 | Sampling height including margins (display only) |
| actual_width | INT | 8648–16384 | Width remaining after trimming margins |
| actual_height | INT | 13768–16384 | Height remaining after trimming margins |
| actual_ratio | STRING | Actual ratio after trimming margins (display only) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width x height | IPT-Size | — |
| width | INT | — |
| height | INT | — |
| margin | IPT-Margin | — |