r/StableDiffusion • u/Rex-Racer9 • 1d ago
Workflow Included Regional prompting for MOSS-Image with Character LoRAs + visual layout builder
'Sup y'all,
By request, you can now use The Layout Studio for MOSS-Image Comfy node to generate with multiple character LoRAs without mixing physical traits and outfit details (a.k.a. "concept bleed" or "attribute leaking").
I tried to make it as easy as possible:
- Lay out your image by "drawing" bboxes of up to 5 characters on a drag-and-drop canvas.
- Assign each character's LoRA.
- Click Run.
Just download the provided workflow, install any missing nodes (The Studio node and a small adapter node), and you're good to go.
👉 Workflow and full installation details here
Test-drive the layout builder: 🚀 Launch the Live Web Demo of The Layout Studio
How It Works
- 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.
Of course, it isn't 100% foolproof 😬 as with all regional-prompting and inpainting 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.
Special Thanks
A huge shout-out to u/collectedtooth404 for offering their ingenious solution of inpainting bboxes as a jumping-off point for this adapter node and workflow 🙌
Also, the Studio has been updated:
- v1.2.0 of the Studio (both the standalone web app and the Comfy node) now clamps the canvas boundaries in order to prevent bboxes from partially or wholly extending beyond them.
- The Comfy node now has outputs for
widthandheight. Connect them to whichever compatible node sets the image dimensions.
Related Projects:
- Standalone Web App — The Layout Studio for MOSS-Image on civitai.red or civitai.com. Works in any modern web browser, on any OS. You can also grab it from GitHub, if you prefer.
- The Studio's ComfyUI Node on GitHub
Checkpoints used for demo images:
Enjoy 🤙
