MOSS-Image Arrives in ComfyUI, and Commercial Use Is OK

Minimal tech illustration of a node workflow screen beside spatial bounding box layout guides

Say you're making an image for a presentation, and the title must be at the top, the person on the right, and the date at the bottom left. Even if you describe this at length in words, image AI often gives you results that go their own way.

The title covers the person's face, the date lands somewhere strange, or the text you asked for turns into odd characters. The picture itself looks plausible, but there's a pile of things left to fix.

MOSS-Image, released on October 16, is an image generation model focused on reducing this problem. It doesn't just take a sentence telling it to draw a picture; you can specify, in a structured way, where the text and objects inside the image should go.

On top of that, ComfyUI support has been merged into the official repository. For anyone who enjoys connecting nodes, it's a new guest worth keeping an eye on.

It Doesn't Just Draw, It Also Gets Told Where to Put Things

What MOSS-Image puts forward as its feature is layout control. Imagine making a travel poster. You want a cream background, a blue mountain illustration at the bottom, and a large title, 'EXPLORE,' at the top.

A normal prompt would explain this in sentences one after another, but with MOSS-Image you can split the whole scene and each element's position using a structured input called JSON. (Actually, "Ideogram 4" already supports this too.)

✦ Layout Input Structure

From the whole scene to element positions

1Whole scene (summary.caption)
Describe the entire scene
2Items (items)
List each element to include, one by one
3Type (label) and description (caption)
Say whether an element is text or a picture, and what it looks like
4Actual wording (text)
Write the text to include exactly
5Position (bbox)
Specify where the element goes, using coordinates

For example, you describe the whole scene as 'a minimalist travel poster,' classify one item as text, and write EXPLORE as the actual text to include. Then you specify where that text box goes, using coordinates.

You make the mountain illustration a separate item and specify its position too. Put simply, instead of ending with telling a painter 'mountain at the bottom, title at the top,' you spread a layout plan over the canvas and mark the spot for each element.

✦ Where It Helps

Work where text and pictures go together

1Blog thumbnails
2Event posters
3Signs
4Infographics with text

This approach is especially useful for work where text and pictures go together, such as thumbnails, event posters, signs, menus, and infographics.

Rather than leaving designs with text of random sizes and positions to luck every time, you can pass the composition you want in as input. Of course, adding coordinates doesn't mean every element always lands exactly right.

Still, it has the advantage that when you don't like a result, it becomes much clearer which item's position to change before trying again.

Also, realistically, writing a JSON prompt ourselves by hand is hard, so you'll need a tool (ChatGPT, a local LLM, and so on) that converts the prompt we type into JSON format.

MOSS-Image is introduced as supporting prompts up to 4K tokens long. Here, 4K doesn't mean image resolution; it means the length of the text passed to the model. It's not saying it makes 4K photos right away.

It's closer to saying there's room to describe complex scenes and multiple elements. For a local image model, it can understand quite a lot of prompt. Given that JSON prompts inevitably get long, you could call it an essential feature.

Base and SFT: Similar Names, Different Uses

✦ Base vs SFT

The two released MOSS-Image models

✔ Size: Both are 5B
✔ MOSS-Image-Base: A good starting point for adding further training
✔ MOSS-Image-SFT: A version tuned to output images that look good to people

The released models are two: MOSS-Image-Base and MOSS-Image-SFT. Both are 5B in size, but their purposes differ. Base is a good starting point for adding further training, and SFT is a version that went through fine-tuning on selected data.

If a regular user wants to start making images right away, try SFT first.

In the examples the development team released, SFT grouped the text written on the blackboard together better and made the whiteboard layout tidier. The SFT after the model name stands for 'Supervised Fine-Tuning.'

It means the model was trained further for the work people want it to do. Base, on the other hand, can be a starting point for people who want to train LoRAs and the like themselves to fit a certain style or task.

For reference, in other image generation models too, the Base model is mostly used by people who make fine-tuning checkpoints and LoRAs, and by researchers.

So we can use models that have been polished to produce decent images, such as distilled models and SFT models. When you generate images with a Base model, too many varied images come out, and sometimes you get bizarre or strange scenes.

That's because AI can't yet fully judge which images look appropriate to humans. Distilled models, however, were trained on images that humans look at and think "that's a decent image." So they usually give us images we like.

In exchange, they have less diversity than the Base model.

The ability to put text into images is another thing MOSS-Image emphasizes.

Examples have been released such as asking for a note stuck on a fridge that reads something like "two cartons of milk, a tray of eggs, a bag of bread," or laying out a title and explanation across several lines on a whiteboard.

Text inside images is traditionally where generation models often slip, so rather than just glancing over samples with text, it's important to check whether the actual wording is accurate and whether the line breaks are easy to read.

The official guide also says that if you want precise control over line breaks, you should put \n or an actual line break in the prompt.

How Do You Try It in ComfyUI?

ComfyUI nodes and an example workflow for MOSS-Image have also been released. MOSS-Image support code was merged into the official ComfyUI repository on October 16, and the project repository also explains how to install the plugin.

✦ Getting Started in ComfyUI

From preparing a supported version to generating

1Prepare
A ComfyUI version with MOSS-Image support
2Download
The model files
3Load
The moss-image.json workflow
4Point
The loader to the model folder
5Enter
A prompt or a layout
6Generate
Create the image

First, prepare a version of ComfyUI that includes MOSS-Image support, and download the model files.

Then drag the moss-image.json workflow from the official repository onto the ComfyUI screen, and in the MOSS-Image loader, specify the folder where the model is stored.

The model folder needs to contain directories such as transformer, text_encoder, tokenizer, and vae. The official guide also describes installing the project plugin separately, so depending on the ComfyUI version you use, just follow the path described.

Search "Comfy-Org/MOSS-Image" on Google. The official ComfyUI Hugging Face repository should come right up.

<See how the SFT model runs on low VRAM in this workflow video.>
* From the REBEL AI YouTube channel.

✦ Default Sampling Settings

Default model settings

Settings
• Sampler: Euler
• Steps: 50 (Base generally 50 or more)
• CFG: 3
• Shift: 5
• Negative-branch skip layer: 22
• Negative prompt: empty by default

The official guide's default sampling settings are the Euler sampler, 50 steps, CFG 3, and Shift 5. For Base, 50 steps or more is generally recommended, so if you feel the quality of the results is a bit lacking, try raising the step count.

✦ Size and License at a Glance

Model files and terms of use

5BParameters
10.2GBBF16 version
5.4GBINT8 version
Apache 2.0Model weights and inference code

The model file sizes are 10.2GB for the BF16 version and 5.4GB for the INT8 version. The model has 5B parameters, so it's a bit bigger than you'd expect, right?

Still, most image generation models coming out these days are about this size, and there are many even bigger ones, so you've probably all experienced it.

When you run it in ComfyUI, it works somehow even if it has to offload from the GPU to the CPU, so I think there shouldn't be a big problem experimenting with it.

The fact that it's an open model is also welcome. The released model weights and inference code are provided under the Apache 2.0 license. It opens a foundation not only for running it yourself but for using and modifying it within the license terms.

For reference, the Ideogram 4 model, which similarly supports JSON prompts and specialized in text, had many restrictions on commercial use. The Apache 2.0 license, on the other hand, is much freer for commercial use.

So if you were looking for an image generation model that can be used commercially while letting you freely adjust layout and text, MOSS-Image would be a good choice.

MOSS-Image is not a model that sets out to take first place in every image task. It's a model focused on work where you need to handle precisely where objects or text go and what they say.

If you're tired of regenerating results because of the text every time you make a poster, there seems to be plenty of reason to try the SFT model in ComfyUI first.

That's all for this post. See you next time.

Related posts

No comments:

No comments yet. Want to leave the first one?

Post a Comment