cn_03_kemmy_ComfyUI-AspectManager
Reusable resolution presets and aspect-ratio calculation for ComfyUI
cn_03_kemmy_ComfyUI-AspectManager
A ComfyUI custom node for saving frequently used image resolutions and calculating a missing dimension from an aspect ratio.
<img width="515" height="762" alt="image" src="https://github.com/user-attachments/assets/d39f76d1-126a-44e0-8bc6-ad0c5536e840" />Features
- Outputs
widthandheightas ComfyUIINTvalues. - Save any number of named resolution presets.
- Select exactly one saved preset with radio buttons.
- Use dimensions temporarily without saving a preset.
- Enter a width and a ratio to calculate height automatically.
- Enter a height and a ratio to calculate width automatically.
- Accepts ratio formats such as
4:3,16/9, and1.5:1. - Stores the preset library in the ComfyUI user directory.
- Saves the currently selected values inside the workflow so shared workflows remain reproducible.
- No third-party Python dependencies.
Installation
ComfyUI Manager
After this node is published to the Comfy Registry, search for Kemmy Aspect Manager in ComfyUI Manager.
Manual installation
Clone this repository into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/kemmy2302/cn_03_kemmy_ComfyUI-AspectManager
Restart ComfyUI and add:
Add Node → kemmy → Dimensions → cn_03_kemmy_Aspect Manager
Basic usage
Connect the outputs to an image-size input such as Empty Latent Image:
Aspect Manager width ──→ Empty Latent Image width
Aspect Manager height ──→ Empty Latent Image height
Save a preset
- Enter a name, width, and height.
- Optionally enter a ratio.
- Click Save preset.
- The saved item appears in the list and is selected automatically.
Calculate the missing side
Example: calculate a 4:3 height from a width of 1536.
- Enter
1536in Width. - Leave Height empty.
- Enter
4:3in Ratio. - Move focus away from the field or click Calculate missing side.
- Height becomes
1152.
The reverse also works: enter only height and the node calculates width.
If both dimensions contain values, the node preserves them. Clear the side you want recalculated.
Preset storage
The shared library is stored at:
ComfyUI/user/kemmy_aspect_manager/presets.json
The active width and height are also embedded in each workflow through a hidden state field. Opening a workflow on another installation therefore preserves its current output even when that installation does not have the same preset library.
Notes
- Calculated values are rounded to the nearest whole pixel.
- The node does not force dimensions to a multiple of 8, 16, 32, or 64. Save model-compatible resolutions appropriate for your workflow.
- Delete removes a preset from the shared library. It does not modify previously saved workflow files.
License
MIT