Extensions/ComfyUI - Align Shortcuts
ComfyUI Extension

ComfyUI - Align Shortcuts

Shortcuts for aligning nodes.

By m21-cerutti·Created 4 months ago·Updated 4 months ago· 0
m21-cerutti/comfyui-align-shortcuts
Nodes
On cloudLocal install
Stars0
Updated4 months ago
Readme
<div align="center">

ComfyUI-Align Shortcuts

Shortcuts designed to help align nodes in a comfyui editor. <br> Based on https://github.com/coolzilj/ComfyUI-LJNodes.

GitHub Release GitHub Release Date GitHub All Releases GitHub Stars

<img alt="ComfyUI-Align Shortcuts Logo" src="assets/example.png" /> <br> </div> <!-- omit in toc -->

Summary

Description

This custom node suite provides intuitive shortcuts to align groups of nodes within the ComfyUI editor.

It address limitations found in others alignment tools, like ComfyUI-Align not supporting Node 2.0, and ComfyUI-LJNodes that was abandonned.

Installation

ComfyUI Manager (Recommended)

This is the easiest method:

  1. Open ComfyUI and go to Manager > Install Custom Nodes.
  2. Search for Align nodes in the search bar.
  3. Click Install.

Git Clone / Symlink Setup (Advanced/Manual)

ComfyUI must be installed and running (see requirements). Keep in mind where is your path for models, we will use $COMFYUI_ROOT in documentation.

  1. Navigate to the target custom_nodes folder inside your main ComfyUI installation:

    cd $COMFYUI_ROOT/custom_nodes
    
  2. Clone the repository with:

    git clone https://github.com/m21-cerutti/ComfyUI-Align-Shortcuts.git
    

Usage

Align nodes shortcuts

  1. Select the desired group of nodes by clicking Alt and dragging over them, or holding Shift + click to select individual nodes.

  2. Use the configured shortcut keys, by default:

    • Alt + W: Aligns all selected nodes vertically by their top edge.
    <img src="assets/top.png" alt="op alignment" width="200"/>
    • Alt + S: Aligns all selected nodes vertically by their bottom edge.
    <img src="assets/bottom.png" alt="Bottom alignment" width="200"/>
    • Alt + A: Aligns all selected nodes horizontally by their left edge.
    <img src="assets/left.png" alt="Left alignment t" height="200"/>
    • Alt + D: Aligns all selected nodes horizontally by their right edge.
    <img src="assets/right.png" alt="Right alignment" height="200"/>

Changing Keybindings

Keybinding customization is handled by ComfyUI's settings. To change the shortcut used for node alignment:

  1. Access the ComfyUI Interface Settings and search for "Align node".
  2. Modify the existing keymap entries assigned to our shortcuts (Alt + W/A/S/D).

Keybindings

For full documentation, please see: https://docs.comfy.org/interface/shortcuts

Kown issues

  • We can't use Alt + Arrow for keybing when there is selected nodes.

See https://github.com/Comfy-Org/ComfyUI_frontend/issues/12112

Contribution Guide

This project welcomes contributions! If you find a bug or want to add a feature, please instructions inside CONTRIBUTING.md

Authors

  • Marc CERUTTI
  • Initial author @SongZi

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Others utilities tools for inspiration and useful in ComfyUI journey :