The Layout Studio for MOSS-Image Regional LoRAs Adapter
Regional prompting with character LoRAs for MOSS-Image thanks to this adapter node for The Layout Studio that separates Character Items for SAM3-segmented inpainting using character LoRAs. v1.2.1 simply fixes Registry icon and banner URLs (no node code changes from v1.2.0).
The Layout Studio for MOSS-Image: Regional LoRAs
Regional prompting with character LoRAs for MOSS-Image thanks to this lightweight adapter node for The Layout Studio. Lay out your image by "drawing" bboxes of up to 5 characters on a drag-and-drop canvas. SAM 3 attention then ensures each character is inpainted using its dedicated character LoRA.
💫 Generate with multiple character LoRAs without mixing physical traits and outfit details (a.k.a. "concept bleed" or "attribute leaking")
<p align="center"> <img src="./images/screenshots/layout-studio-moss-image-regional-loras-hero.webp" width="800" alt="The Layout Studio for MOSS-Image: Regional LoRAs Adapter + Workflow"><br> <em>The Layout Studio for MOSS-Image: Regional LoRAs Adapter + Workflow</em> </p>Table of Contents
- Overview
- How It Works
- Prerequisites, Nodes & Models
- Installation
- Using the Layout Studio
- Troubleshooting
- Related Projects
- File Structure
- Feedback & Support
- License
- About MOSS-Image
- Tips are welcome
- Changelog
Overview
When combined with The Layout Studio for MOSS-Image ComfyUI node and the attached workflow, this lightweight ComfyUI adapter node brings regional prompting to MOSS-Image — letting you place characters where you want them in the Studio's user-friendly drag-and-drop interface — by using each Character Item bounding box ("bbox") from the Studio's JSON output and inpainting it using the character's corresponding LoRA.
<p align="center"> <img src="./images/screenshots/layout-studio-moss-image-regional-loras-photoreal.webp" width="800" alt="The Layout Studio for MOSS-Image: Regional LoRAs Adapter + Workflow"> </p>🚀 Launch the Live Web Demo of The Layout Studio
Of course, it isn't 100% foolproof 😬 as with all regional-prompting solutions, overlapping regions/close character proximity can still cause minor leakage.
However, instead of inpainting full rectangular bounding boxes, which can pull in unwanted details behind and around the character, this workflow uses SAM 3 box-guided segmentation with mask expansion and feathering to keep characters as separate as possible.
<p align="center"> <img src="./images/screenshots/layout-studio-moss-image-regional-loras-mix.webp" width="600" alt="The Layout Studio for MOSS-Image: Regional LoRAs Adapter + Workflow"> </p> <p align="center"> <em>Default workflow output image. Not cherry-picked or refined in any way.</em> </p>How It Works
<p align="center"> <img src="./images/screenshots/layout-studio-moss-image-regional-loras-workflow.webp" width="800" alt="The Layout Studio for MOSS-Image: Regional LoRAs Workflow"><br> <em>The Layout Studio for MOSS-Image: Regional LoRAs Workflow</em> </p>- Visual Layout & JSON Prompt (
LayoutStudioMOSSImageNode): Lay out characters, text, and objects visually in the embedded Layout Studio to produce the layout JSON,width, andheight. - Pass #1 — Global Scene Pass (
KSampler): Generates the full-scene base latent using the global JSON prompt, MOSS-Image model, and global settings so characters share scene context, composition, and lighting from the start. - Single Preview Decode + SAM 3 Silhouette Masks: Branches a single
VAEDecodeoff Pass #1 (leaving the main background latent untouched by extra encode/decode cycles) and runsSAM3Detectguided by each character'sBOUNDING_BOX, followed byGrowMaskWithBlur. - Passes #2–#6 — Regional Character LoRA Passes: Each active character slot applies its character LoRA, character prompt, and refined mask via
SetLatentNoiseMask+KSamplerbefore a singleFinal decode(VAEDecode) andSaveImage.
Special Thanks
A big shoutout to Reddit user u/collectedtooth404 for offering his ingenious solution of inpainting bboxes as a jumping-off point for this adapter node and workflow.
Prerequisites, Nodes & Models
-
ComfyUI (up to date)
-
Nodes:
- The Layout Studio for MOSS-Image ComfyUI node (
LayoutStudioMOSSImageNode) - SAM 3 node (
SAM3Detect) — native ComfyUI node - Grow Mask With Blur node (
GrowMaskWithBlur) — KJNodes custom node
- The Layout Studio for MOSS-Image ComfyUI node (
-
MOSS-Image models:
- Diffusion model in
ComfyUI/models/diffusion_models/- any MOSS-Image checkpoint. By default, the attached workflow usesmoss_image_sft_turbo_int8_convrot.safetensors(link in workflow) - Text encoder in
ComfyUI/models/text_encoders/- any compatible text encoder. By default, the attached workflow uses (qwen3.5_9b_w4a8_gptq.safetensors) (link in workflow) - VAE in
ComfyUI/models/vae/- any compatible text encoder. By default, the attached workflow uses (flux2-vae_small.safetensors) (link in workflow)
- Diffusion model in
-
SAM 3 weights in
ComfyUI/models/checkpoints/- The official SAM 3 weights (from Meta'ssam3repository) or a compatible community-quantized SAM 3 checkpoint supported by your SAM 3 loader node. By default, the attached workflow uses (sam3.1_multiplex_int8_convrot_selective_fp16clip_fp32source.safetensors) (link in workflow) -
Character & Global LoRAs: Placed in
ComfyUI/models/loras/. -
Checkpoints used for demo images:
Installation
Recommended: Install via Workflow JSON (ComfyUI-Manager)
-
Download and open this repository's latest Layout-Studio-MOSS-Regional-LoRAs workflow JSON in ComfyUI. Click here for the workflow.
-
Install the Missing Node Packs (including The Layout Studio for MOSS-Image and The Layout Studio MOSS Regional LoRAs Adapter), then click Apply Changes and restart ComfyUI when prompted.
-
⚠️ IMPORTANT: Hard-refresh the workflow page. This is required to make the
Open Layout Studiobutton on The Layout Studio for MOSS-Image node display. You only need do to this once per fresh install or after an update of the node.To hard-refresh a web page on most desktop browsers:
- Windows & Linux:
Ctrl + F5orCtrl + Shift + R - Mac:
⌘ Command + Shift + Ror, in Safari,Option + ⌘ Command + R— if that doesn’t work, in Safari use Develop → Empty Caches, then reload.
- Windows & Linux:
Using the Layout Studio
-
In The Layout Studio for MOSS-Image node, click Open Layout Studio.
-
Click Reset to start with a clean canvas.
-
In the Summary & Settings tab (tab 1), configure your Global Scene Summary, canvas aspect ratio dimensions, megapixels, meta tags, and color palette and/or type of lighting.
💡 TIP: In the summary, be sure to mention each character and what they're doing. No need to describe them in detail, but this will help the first pass of the workflow better define which character goes where and can help avoid concept bleed.
-
Click + Add Bounding Box in the header to add
Text,Object, orCharacter Itembounding boxes to the canvas and their corresponding "cards" in the Items tab (tab 2). -
Enter the text (for Text Items) and the
caption(prompt) in each Item Card.⚠️ NOTE : For Character Items using character LoRAs:
- Be sure to include trigger words (if any)
- Make sure the Character Item # corresponds to its Character LoRA Group # and LoRA in the workflow. Re-order the Character Item cards via drag-and-drop if necessary.
Character Items not needing LoRAs must be lower in order than those needing LoRAs. Bypass any unused Character LoRA Groups in the workflow.
-
Adjust bounding box sizes and placement directly on the workspace canvas.
-
Click Export > Apply to workflow.
-
In each active Character LoRA Group, load the corresponding LoRA:
👉 For the full list of Layout Studio features, visit the Layout Studio for MOSS-Image Comfy Node repo.
Troubleshooting
-
Background details change inside the character's bounding box: Confirm that
SAM3Detectis receiving that character'sBOUNDING_BOX(not aMASKtensor) and that its output feedsGrowMaskWithBlurbeforeSetLatentNoiseMask. If the mask is too wide, lowerexpandonGrowMaskWithBluror tighten the character's bounding box in Layout Studio. -
Details or props from one character bleed onto another (or persist from Pass #1): High-contrast elements or props can appear in Pass #1 and carry over into later character passes if
denoiseor step count is too low to overwrite them. In the Layout Studio > Summary & Settings tab > Global Scene Summary (summary.caption), give clear spatial/visual anchors for each character without over-specifying fine character-specific props, and moderately raise character passdenoise(or add a few steps) when a character pass needs to cleanly replace Pass #1 details. -
Delicate details like hair wisps, wings, antennae, or outfit edges get clipped or seamy: Increase
expandslightly onGrowMaskWithBlur(for example to12–16) and adjustblur_radius(around2–6) so the latent mask extends slightly past fine silhouettes and blends smoothly into the surrounding latent. -
Character passes 3–5 cause errors or unwanted edits when unused: Bypass unused Character LoRA Groups so the latent passes straight through.
-
SAM 3 fails to load or segment: Verify that your SAM 3 loader node matches the checkpoint format you placed in your models folder (falling back to a standard BF16/FP16 checkpoint if a quantized file isn't supported by your loader).
Related Projects
- Standalone Web App:
layout-studio-moss-image— The Layout Studio for MOSS-Image. Runs in any web browser, on any OS. Copy the JSON prompt and drop it in your favorite generator running MOSS-Image. - ComfyUI Layout Node:
layout-studio-moss-image-comfy-node— The Layout Studio for MOSS-Image ComfyUI node (LayoutStudioMOSSImageNode)
File Structure:
/assets/images/ Logos
__init__.py Required ComfyUI file
pyproject.toml Required ComfyUI Registry file
nodes.py Regional LoRA Adapter node
Feedback & support
Encountered a bug or have a feature request? Report an issue here on GitHub. If you don't have a GitHub account, leave a comment on the Civitai page : Civitai.red / Civitai.com.
License
Released open-source under the GNU GPL v3 Licence. Independent community tool, not affiliated with OpenMOSS.
About MOSS-Image
To make the most of MOSS-Image, be sure to read its official User Guide.
Tips are welcome
If you find this tool useful, feel free to toss me some Buzz on Civitai: Civitai.red / Civitai.com 🤙
Changelog
Version 1.2.1
2 December 2026
- Fixed ComfyUI Registry information. No code change from v1.2.0.
Version 1.2.0
2 December 2026
- Initial Release. Instead of launching with "1.0.0", this initial release version aligns with the current version 1.2.0 of the standalone web app, in order to avoid any confusion.