Nodes/Allbuy Node DIY Panel/Node Alignment Panel
ComfyUI Node

Node Alignment Panel

The floating button that finally tidies your node canvas (no wires, no VRAM)

By 3ALLBUY14·Created about a month ago·Updated 2 days ago· 1
Node Alignment Panel

      ComfyUI's canvas is where workflows go to die. You drag in fifty nodes to chase one LoRA, everything drifts sideways, and suddenly you're holding Ctrl and nudging arrows for ten minutes so the graph looks like a person made it. This node is that ten minutes, automated.

      Despite the name, Node Alignment Panel isn't a node you wire into anything. It has zero inputs and zero outputs, and that's the whole idea. It's a frontend plugin that installs a circular floating button in the bottom-right corner of your canvas. Select two or more nodes, and it'll align them, normalize their sizes, color-code them, snap them together as you drag, and wrap them in a group - all from popups attached to that button, with blue dashed previews so you see what an alignment will do before it happens.

      It belongs to the same family as rgthree-comfy: quality-of-life, not capability. It doesn't generate, upscale, or condition a single pixel. What it does is keep a graph you have to live in from becoming unreadable. For that, a handful of extras actually do real work under the hood - more on those below.

      How it works (and why it's so light)

      The Python side is a stub. NodeAlignmentPanel declares no inputs, returns an empty tuple from its process_alignment() function, and the class docstring says it plainly: the backend does nothing, because the alignment logic is handled by the frontend. The node exists to register the Vue/JS extension that's the real product.

      Everything live lives in the pack's js/ folder - main.js for the panel, snap.js for drag guides, group.js for group creation - loaded through WEB_DIRECTORY. On startup it patches LiteGraph's prototypes in a couple of targeted places:

      • drawTitleText and drawSlots are wrapped so that when you paint a node an arbitrary color, the title and slot labels automatically flip to white or black based on the background's luminance. That's how you can make every section of a workflow a different color and still read it.
      • LGraphGroup.draw() is patched to restore the font_size behavior that ComfyUI's v20.3+ frontend broke when it started hardcoding GROUP_TEXT_SIZE=20 and NODE_TITLE_HEIGHT=30. If the right-click "Font size" menu on groups had gone dead for you recently - that's the regression this fixes.

      There are no Python dependencies in pyproject.toml, no model downloads, no API calls. The only "backend" feature is a 🧹 button that calls ComfyUI's own free-VRAM/RAM endpoint, which is handy mid-session when you've stacked a few too many checkpoints in a row.

      The bits you'll actually use

      • Right-click the floating button for the align popup: 14 modes covering edge align (left/right/top/bottom), center align, size normalization, and flow layout, with a gap setting (0–200, default 30) so auto-arranged nodes don't touch. Hover any button and a blue dashed preview shows you the result before you click.
      • Drag-to-snap (toggle with Alt+S): drag a node near another and it snaps to edges and centers with guide lines. Snap distance is configurable, Shift temporarily bypasses it, and holding a node over a panel UI element auto-disables it so the two never fight.
      • Colors, which is honestly the feature that wins people over: 14 preset palettes, custom hex input, copy/paste of a full color scheme (title, body, group, text), a browser eyedropper, and a group creation button that wraps your selection in a native LGraphGroup with correct padding. Undo/redo for align and color each have their own 50-step stack, so Ctrl+Z won't nuke your color work when you meant to undo an alignment (and vice versa).
      • Alt+V toggles the whole panel on and off.

      Installing it

      Clone into custom_nodes and restart - that's the whole process:

      cd ComfyUI/custom_nodes/
      git clone https://github.com/3ALLBUY14/ComfyUI-Majordomo.git
      

      Then restart ComfyUI. Or, easier: install via ComfyUI Manager by searching for "ComfyUI-Majordomo" (it may list as Node Alignment Panel). No pip install, no extra requirements - because the heavy lifting is browser JavaScript, a restart is all it takes to load.

      Gotchas

      The two things that trip people up are expectations, not bugs. First: don't go hunting for this node to drag into a workflow - the button appears on the canvas after restart whether or not the node is in your graph. Most align/color tools need two or more selected nodes to enable; buttons gray out live when you haven't selected enough. Second: because it patches the frontend rather than the backend, it's hostage to ComfyUI's own UI rewrites - it already had to fix one (the v20.3 group font-size break). If an update ever makes the button vanish, check the browser console first and, if you're running the opt-in Nodes 2.0 beta, try the legacy canvas.

      One honest caveat: this pack is new - v1 landed in late July 2026 - so you won't find a crowd of people troubleshooting it yet. If something misbehaves, that's what the GitHub issue tracker is for. For a workflow you live in daily, though, it's a genuinely nice upgrade over stock canvas behavior.

      Categorynode_alignment/panel

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs