ComfyUI Node
Fit Aspect (Head-Safe) - Closest AR + Tight Cover
A ComfyUI node in PortraitUtils/Transform with 12 inputs and 6 outputs.
Fit Aspect (Head-Safe) - Closest AR + Tight Cover
- image
- w
- h
- x
- y
- aspect_used
- debug
◄x—►
◄y—►
◄w—►
◄h—►
◄aspects_csv2:3,3:4,1:1,9:16,16:9,5:8,8:5►
◄match_tomq_box►
◄headroom_ratio0.12►
◄footroom_ratio0.06►
◄side_margin_ratio0.08►
◄bottom_priority0.75►
◄horiz_gravitycenter►
CategoryPortraitUtils/Transform
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| x | INT | — | |
| y | INT | — | |
| w | INT | — | |
| h | INT | — | |
| aspects_csv | STRING | 2:3,3:4,1:1,9:16,16:9,5:8,8:5 | — |
| match_to | COMBO | mq_box | 2 options: image, mq_box |
| headroom_ratio | FLOAT | 0.120–0.5 | — |
| footroom_ratio | FLOAT | 0.060–0.5 | — |
| side_margin_ratio | FLOAT | 0.080–0.5 | — |
| bottom_priority | FLOAT | 0.750–1 | — |
| horiz_gravity | COMBO | center | 3 options: center, left, right |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| w | INT | — |
| h | INT | — |
| x | INT | — |
| y | INT | — |
| aspect_used | STRING | — |
| debug | STRING | — |