ComfyUI Extension
Moss-Layout-Studio
Unified visual layout canvas and bilingual prompt builder node for MOSS-Image in ComfyUI.
demon820308/Moss-Layout-Studio
Nodes—
On cloudLocal install
Stars0
Updated2 days ago
Readme
Moss-Layout-Studio
A unified, streamlined ComfyUI custom node for MOSS-Image layout-controlled image generation. It combines bounding-box drawing, MOSS-Image JSON layout compilation (abs_centralized / yxyx), and readable prompt inspection into a single dual-column interactive node.

Installation
Via ComfyUI-Manager / Comfy Registry
Search for Moss-Layout-Studio in ComfyUI-Manager, or install via CLI:
comfy node install moss-layout-studio
Manual Installation
cd ComfyUI/custom_nodes
git clone https://github.com/demon820308/Moss-Layout-Studio.git
No extra pip dependencies are required beyond standard ComfyUI (torch, numpy, Pillow).
Features
- All-in-One Dual-Column UI: Replaces separate
CreateBoundingBoxes+MOSSImageLayoutPrompt+PreviewAnynodes with one clean workspace. - Live Aspect-Ratio Sync: Automatically reads upstream
ResolutionSelector(or connectedwidth/heightnodes) so the canvas paper updates its aspect ratio immediately without running the queue first. - Intuitive Canvas Editing:
- Drag on empty space to create a new box; smallest-box-first hit testing &
Alt + Clickto cycle overlapping boxes. - Smart snap guide lines to canvas edges, 5% safe margins, center lines, and other boxes' edges/centers.
Shift + Clickmulti-select for group dragging, alignment (Left / Center X / Right / Top / Center Y / Bottom), and even distribution (Distribute X / Y).Ctrl+Zundo, box duplication, and one-click toggle (Enable Layout) to bypass boxes and output plain text without rewiring.
- Drag on empty space to create a new box; smallest-box-first hit testing &
- Bilingual UI (
中 / EN): Instant one-click switch between Chinese and English UI labels. - Checklist & Two-Way JSON Drawer: View a clean human-readable checklist or switch to raw JSON to copy or import existing MOSS-Image layouts back onto the canvas.
中文说明
Moss-Layout-Studio 是专为 MOSS-Image 打造的极简三合一布局控制节点,将「创建边界框 + 布局提示词编译 + 输出预览」整合为单个左右双栏交互节点。
核心特性
- 三合一双栏工作台:左栏画布拖拽排版、右栏写总场景描述与局部细节,并内置
中 / EN一键中英文界面切换。 - 免运行实时画幅同步:连接上游
ResolutionSelector(分辨率选择器)后,切换宽高比时画布纸张比例立即跟随变化,无需先跑一次队列。 - 顺手的对齐与排版操作:
- 空白处直接拖拽建框,小框压在大框上时优先点中(支持
Alt + 点击循环切换重叠框)。 - 拖动/缩放时自动触发智能吸附参考线(画布中心、四边、5% 安全边距及其他框的边缘/中心线)。
- 支持
Shift + 点击多选:整组拖动、多框对齐(左/水平居中/右/顶/垂直居中/底)与 3 框以上等距分布。 - 一键纯文本切换:关闭「启用布局框」即可保留框数据并直接输出纯文本提示词,无需拔线。
- 空白处直接拖拽建框,小框压在大框上时优先点中(支持
- 可读清单 | JSON 源码双视图:底部可折叠抽屉支持查看清晰的分条清单,或切换到 JSON 源码一键复制 / 粘贴已有 MOSS-Image JSON 反向还原到画布。
上游格式说明
本插件为独立编写的前端交互与布局编译工程插件(MIT 协议),输出遵循 OpenMOSS/MOSS-Image 与 ComfyUI 官方 MOSSImageLayoutPrompt 所使用的 abs_centralized、yxyx 中心原点像素坐标 JSON 格式。