Extensions/cn_03_kemmy_ComfyUI-AspectManager
ComfyUI Extension

cn_03_kemmy_ComfyUI-AspectManager

Reusable resolution presets and aspect-ratio calculation for ComfyUI

By kemmy2302·Created a day ago·Updated a day ago· 0
kemmy2302/cn_03_kemmy_ComfyUI-AspectManager
Nodes1
On cloudLocal install
Categorykemmy/Dimensions
Stars0
Updateda day ago
Readme

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 width and height as ComfyUI INT values.
  • 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, and 1.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

  1. Enter a name, width, and height.
  2. Optionally enter a ratio.
  3. Click Save preset.
  4. 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.

  1. Enter 1536 in Width.
  2. Leave Height empty.
  3. Enter 4:3 in Ratio.
  4. Move focus away from the field or click Calculate missing side.
  5. 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