ComfyUI Extension: ComfyUI-Wanify: Adaptive Image Resize Node
This custom node for ComfyUI provides adaptive image resizing based on target pixel counts, maintaining aspect ratio and supporting different quality levels. It is useful for workflows that require images to fit within specific pixel budgets (e.g., for video, AI models, or memory constraints).
Custom Nodes (0)
README
ComfyUI-Wanify: Adaptive Image Resize Node
This custom node for ComfyUI provides adaptive image resizing based on target pixel counts, maintaining aspect ratio and supporting different quality levels. It is useful for workflows that require images to fit within specific pixel budgets (e.g., for video, AI models, or memory constraints).
Features
- Resize images to target pixel counts (720p/480p, high/medium/low quality)
- Maintains aspect ratio
- Outputs resized image, width, height, and total pixel count
- Fast and quality modes
Installation
- Download or clone this repository:
git clone https://github.com/blird/ComfyUI-Wanify.git
- Copy the
comfyui-wanify
folder into yourComfyUI/custom_nodes/
directory. - Restart ComfyUI. The node will appear as "Adaptive Image Resize" under the
image/transform
category.
Usage
- Inputs:
image
: Input image tensor (ComfyUI format)model
: Target resolution model (720p
or480p
)quality
: Quality setting (high
,medium
,low
)fast_mode
: Boolean, use fast interpolation (default: True)
- Outputs:
image
: Resized imagewidth
: Output widthheight
: Output heighttotal_pixels
: Output width * height
Example
Adaptive Image Resize
├─ image: (input image)
├─ model: 720p
├─ quality: high
└─ fast_mode: True
Outputs:
├─ image: (resized image)
├─ width: 1280
├─ height: 720
└─ total_pixels: 921600
Requirements
- ComfyUI
- PyTorch (ComfyUI default)
License
[Add your license here]