Nodes/comfyui-dreambait-nodes/Image Resize Face Aware
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.

By drmbt·Created 2 years ago·Updated 6 months ago· 6
Image Resize Face Aware
  • image
  • IMAGE
  • width
  • height
width512
height512
interpolationlanczos
methodkeep proportion
conditionalways
multiple_of0
Categorydreambooth/image

Inputs (7)

NameTypeDefaultDescription
imageIMAGEInput image to be resized
widthINT5120–16384Target width. Set to 0 to automatically calculate based on height while preserving aspect ratio
heightINT5120–16384Target height. Set to 0 to automatically calculate based on width while preserving aspect ratio
interpolationCOMBOlanczosMethod used for interpolation. Lanczos generally gives best quality, nearest is fastest
methodCOMBOkeep proportionResize 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)
conditionCOMBOalwaysWhen to apply the resize operation: always, only when downscaling, only when upscaling, or based on total pixel area
multiple_ofINT00–512Ensure output dimensions are multiples of this value. Set to 0 to disable

Outputs (3)

NameTypeDescription
IMAGEIMAGE
widthINT
heightINT