ComfyUI Node
Image Resize Face Aware
Face-aware image resizing node, forked from ComfyUI_essentials Image Resize. This node extends the original Image Resize functionality with face detection capabilities: - All original resize methods (stretch, keep proportion, fill/crop, pad) - New 'crop to face' method that detects faces, crops to them, and resizes - New 'face-centered square crop' method that produces a square crop centered on the largest detected face without resizing Face detection uses OpenCV's DNN face detector. If no face is detected, falls back to center crop. The face detector model is downloaded automatically on first use. Original Image Resize node by WASasquatch.
Image Resize Face Aware
- image
- IMAGE
- width
- height
◄width512►
◄height512►
◄interpolationlanczos►
◄methodkeep proportion►
◄conditionalways►
◄multiple_of0►
Categorydreambooth/image
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to be resized | |
| width | INT | 5120–16384 | Target width. Set to 0 to automatically calculate based on height while preserving aspect ratio |
| height | INT | 5120–16384 | Target height. Set to 0 to automatically calculate based on width while preserving aspect ratio |
| interpolation | COMBO | lanczos | Method used for interpolation. Lanczos generally gives best quality, nearest is fastest |
| method | COMBO | keep proportion | Resize method: stretch (distort), keep proportion (scale), fill/crop (fill area and crop excess), pad (add borders), crop to face/subject (detect and crop+resize), crop to face/subject (keep_size) (square crop without resizing) |
| condition | COMBO | always | When to apply the resize operation: always, only when downscaling, only when upscaling, or based on total pixel area |
| multiple_of | INT | 00–512 | Ensure output dimensions are multiples of this value. Set to 0 to disable |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| width | INT | — |
| height | INT | — |