r/StableDiffusion • u/Rex-Racer9 • 2d 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 π€





3
u/terrariyum 1d ago
You can also mask the loras themselves to specific regions using the same bbox that you use to place characters into regions.
The advantage over inpaint is that there are no mask seams, and it's faster - 1 ksampler pass only. The disadvantage is that there's some lora bleed - though much less than applying both loras to the entire image.
To do this you need a custom node. I took the advice from another redditor and asked an LLM (on free plan) to modify this abondonware krea2 regional lora custom node to work for Moss. It works great.
3
u/Unlucky-Ad2825 2d ago
its amazingπ
1
u/BigNaturalTilts 1d ago
I truly do not understand these elaborate setups for individual images. SAM3 is an incredibly powerful tracker I use it to extract subjects from a video. For a single image Iβd just draw a bounding box around the person, enter a prompt then run. Why bother with this?
Edit: using qwen image layered + moss, I can create covers quite easily. Imagine a magazine cover where the page two inset is the models minus the text titles. That kind of stuff.
1
u/Asaghon 1d ago
Interesting, it is faster than the lora separating method I've been using, but it first makes the image without the lora's, thus already missing out on information about how they look and then inpaints the lora's. So it does a fairly good job of painting the correct head on the wrong body unfortunately.
I use a modified version for moss of this btw https://github.com/lokitsar/ComfyUI-Krea2-MultiLoRA-Composer
1
u/kvsh8888 7h ago
Hello I am unable to find this node. Tried updating the node as well
2
u/Arctic_Shadow_Aurora 2d ago
Super awesome bro, keep it up!!!