ComfyUI Extension
ComfyUI-SmartSize
A simple but essential custom node for ComfyUI that automatically detects image dimensions and snaps them to the nearest multiple of 16.
xiujiang1987/ComfyUI-SmartSize
Nodes1
On cloudLocal install
CategorySmartSize
Stars0
Updated7 months ago
Readme
ComfyUI-SmartSize
A simple but essential custom node for ComfyUI that automatically detects image dimensions and snaps them to the nearest multiple of 16. This is critical for Flux and SDXL workflows to prevent EinopsError (shape mismatch) and ensure high-quality generation.
Features
- Auto-Detection: Reads the width and height of any input image.
- Safe Snapping: Automatically adjusts dimensions to be multiples of 16 (e.g., 1000 -> 992).
- Workflow Simplification: No more manual width/height entry in KSampler or EmptyLatent nodes.
Installation
Method 1: Manual
- Clone this repository into your
ComfyUI/custom_nodes/folder:git clone https://github.com/xiujiang1987/ComfyUI-SmartSize.git - Restart ComfyUI.
Method 2: ComfyUI Manager
(Coming soon)
Usage
- Add the node "Smart Image Size (Flux/SDXL)".
- Connect your Load Image node to the input.
- Connect the
widthandheightoutputs to your Empty Latent, ModelSamplingFlux, or ImageScale nodes.- Note: You may need to convert the target node's widgets to inputs first (Right-click node -> Convert Widget to Input).
License
MIT