【ComfyUI】MOSS-Imageの使い方|レイアウト指定でテキストから画像生成

MOSS-Imageは、画像内の文字描画やレイアウト指定に強いOpenMOSSの画像生成モデルです。

2026年10月16日にComfyUI本体がMOSS-Imageに対応し、ネイティブノードで動かせるようになりました。

この記事では、バウンディングボックスで配置を指定してテキストから画像を生成するワークフローの導入方法を紹介します。

MOSS-Imageとは?

MOSS-Imageは、OpenMOSSが公開している5BパラメータのベースDiTモデルです。

テキストから画像を生成するモデルで、自然言語のプロンプト、タグ列、JSONのレイアウトで指示できます。

モデルは、ベースモデルのMOSS-Image-Baseと、それを厳選したデータでファインチューニングしたMOSS-Image-SFTの2種類です。

主な特徴

  • 画像内の文字や要素の配置をレイアウトで制御できる
  • 画像内に読みやすく正確な文字を描画できる
  • 最大4Kトークンの長いプロンプトに対応
  • アニメ調から写実的な画像まで生成できる
  • ベースモデルを独自のタスクや分野向けにファインチューニングしやすい
  • 5Bのバックボーンで効率よく画像を生成できる
GitHub – OpenMOSS/MOSS-Image: Official repository for MOSS-Image, a 5B-parameter base DiT model with high-quality text rendering, layout generation, and efficient fine-tuning.
Official repository for MOSS-Image, a 5B-parameter base DiT model with high-quality text rendering, layout generation, a…

ライセンス

MOSS-Image-BaseとMOSS-Image-SFTのライセンスはApache-2.0です。

ComfyUI向けに再パッケージされたComfy-Org/MOSS-Imageも、同じApache-2.0で公開されています。

詳しくはMOSS-Image-Base、MOSS-Image-SFT、Comfy-Org/MOSS-ImageのHugging Faceページでご確認ください。

ComfyUIのインストール

ComfyUIをまだインストールしていない方は、こちらを参考にしてみてください。

ComfyUIの使い方・始め方まとめ|インストールから基本操作・カスタムノードまで
ComfyUIを始めたいけど、インストール方法がいくつかあってどれを選べばいいか迷う、という方は多いと思います。この記事では、ComfyUIの導入方法の違いと選び方、そして基本的な使い方の入口をまとめて紹介します。各トピックの詳しい手順は、…

ComfyUI 0.42.1で安定版がリリースされたのでアップデートすれば使えます。

Stability Matrixはパッケージ画面、ポータブル版はupdateフォルダのupdate_comfyui_stable.batで更新できます。

必要なモデルのダウンロードと配置

公式ワークフローでは、SFTとBaseのint8_convrot版を使います。

テキストエンコーダーはw4a8_gptq版、VAEはflux2-vae_small.safetensorsです。

拡散モデルは使うワークフローに合わせてSFTかBaseを選び、テキストエンコーダーとVAEもダウンロードしてください。

この記事は安定版リリース前に作成したため、vaeはsmallじゃないflux2-vae.safetensorsを使っています。

種類ファイル名配置先
拡散モデルmoss_image_sft_int8_convrot.safetensorsComfyUI/models/diffusion_models
拡散モデルmoss_image_base_int8_convrot.safetensorsComfyUI/models/diffusion_models
テキストエンコーダーqwen3.5_9b_w4a8_gptq.safetensorsComfyUI/models/text_encoders
VAEflux2-vae_small.safetensorsComfyUI/models/vae
ComfyUI/
└── models/
    ├── diffusion_models/
    │   ├── moss_image_base_int8_convrot.safetensors
    │   └── moss_image_sft_int8_convrot.safetensors
    ├── text_encoders/
    │   └── qwen3.5_9b_w4a8_gptq.safetensors
    └── vae/
        └── flux2-vae_small.safetensors
Comfy-Org/MOSS-Image · Hugging Face
We’re on a journey to advance and democratize artificial intelligence through open source and open science.

ワークフローの読み込み

MOSS-Imageのワークフローは、以下の4種類です。

ダウンロードしたJSONをComfyUIの画面へドラッグ&ドロップすると、ワークフローを読み込めます。

もしくはComfyUIのテンプレート参照から対応するワークフローを読み込んでください。

ComfyUIのテンプレート参照に並ぶMOSS-Imageの4種類のワークフロー

MOSS-Imageでテキストから画像生成

image_moss_image_base_t2iのワークフローを使います。

まずサブグラフのText to Image (MOSS-Image)でモデルを指定します。

Text to Image (MOSS-Image)でBaseモデル、テキストエンコーダー、VAEを指定する画面

SLGはON・OFFで以下のような傾向になるそうです。

• OFF:より写実的になる一方、細部が崩れる場合がある
• ON:細部を保つ方向に働く一方、アニメ調では表現が過剰になる場合がある

生成したいものをプロンプトとして入力します。

プロンプトをLLMで拡張させたい場合はenable_prompt_enhancerをONにしてください。

Resolution Selectorで画像サイズを指定できます。

Resolution Selectorでアスペクト比1:1、画素数1.0メガピクセルを指定する画面

・結果

RTX4060Ti(VRAM16GB/RAM64GB)、Base int8モデルで生成は約26秒でした。

enable_prompt_upsamplerとSLGはOFFです。

・フォトリアル

MOSS-Image Baseで生成した、雨のカフェの窓辺でカップを口元に寄せる女性のフォトリアル画像
A candid photograph of a young woman sitting by a rain-streaked café window in Tokyo at dusk, holding a steaming cup of coffee with both hands. Soft neon reflections from the street glow on the wet glass, and warm tungsten light from inside the café falls across her face. She wears a cream knit sweater and has shoulder-length dark hair with a few loose strands. Shot on a 50mm lens at f/1.8, shallow depth of field, natural skin texture, subtle film grain.

enable_prompt_upsamplerとSLGをONにしても約25秒とほぼ同じでした。

拡張後のプロンプトはサブグラフの中にあるPreview as Text (final prompt)で確認可能です。

プロンプト拡張とSLGをONにしてMOSS-Image Baseで生成した、カフェの窓辺でカップを持つ女性の画像
A candid photograph captures a young woman seated by a rain-streaked café window in Tokyo at dusk, holding a steaming cup of coffee with both hands. She is positioned in the foreground, slightly off-center to the left, wearing a cream knit sweater with shoulder-length dark hair where a few loose strands frame her face. The composition emphasizes the contrast between the cool, blurred exterior and the intimate interior. Soft neon reflections from the street glow on the wet glass behind her, casting streaks of pink and blue light, while warm tungsten light from inside the café falls across her face, highlighting natural skin texture and subtle film grain. The shallow depth of field, achieved with a 50mm lens at f/1.8, keeps her sharp while rendering the rainy Tokyo street and café interior softly out of focus. The color palette blends the muted grays of the evening rain with the cozy amber tones of the indoor lighting and the pastel hues of the neon signs.

・アニメ

MOSS-Image Baseで生成した、海沿いの道を走る銀髪の少女のアニメ画像
Anime illustration of a cheerful girl with long silver hair and amber eyes, wearing a navy school uniform with a red ribbon, running along a seaside road on a bright summer afternoon. Her hair and skirt flutter in the wind, and she is reaching out toward the camera with a big smile. Behind her, a white lighthouse stands against a deep blue sky with towering cumulus clouds. Clean line art, vivid colors, soft cel shading, detailed background.

・フォトリアル(テキストあり)

MOSS-Image Baseで生成した、Morning Crumbs Bakeryの看板があるパン屋のフォトリアル画像
A realistic photograph of a small corner bakery in the early morning, seen from across a quiet cobblestone street. Above the entrance hangs a dark green wooden sign with gold hand-painted letters that read “Morning Crumbs Bakery”. In the front window, a chalkboard easel says “Fresh Bread Daily – Open 7AM” in white chalk handwriting. Warm golden light spills out from inside, illuminating baskets of baguettes and croissants on display. Soft morning haze, natural colors, shot on a 35mm lens, sharp focus on the signs.

image_moss_image_t2iはモデルがSFTなのと、初期値のON/OFFが違うくらいです。

SFT int8モデルも生成時間はほぼ同じ26秒前後でした。

プロンプトは上記と同じです。

MOSS-Imageでレイアウトを指定して画像生成

こちらのワークフローは、指定の領域にオブジェクトやテキストを追加して画像生成できます。

image_moss_image_t2i_bboxesはSFTモデル、image_moss_image_base_t2i_bboxesはBaseモデルというだけで、操作方法はほぼ一緒です。

まずCreate Bounding Boxesを使うために、左上のメニューからNodes2.0をONにしてください。

左上のメニューからNodes2.0をONにする画面

Resolution Selectorで画像サイズを指定します。

Resolution Selectorで画像サイズを1024×1024に指定した画面

Create Bounding Boxesでどの領域に何を生成するかを指定します。

obj(オブジェクト)は人や物、textは文字入れしたいときに使うものです。

例えば指定の位置にカモメを描きたい場合、01のようにします。

左下の02はtextでバス停の標識を指定しているものです。

Create Bounding Boxesでカモメ(01)とバス停の標識(02)の領域を指定した画面

textの場合は、descriptionに追加する内容、textに表示したいテキストを入力します。

Create Bounding Boxesのtextでdescriptionとtextを入力する画面

あとMOSS-Image Layout Promptのcharacter_boxesがデフォルトで1になっています。

これは指定のボックスに対して、”character”というラベルを付けるものです。

"items":[{"label":"character","caption":"a flock of white seagulls flying in the summer sky","bbox":[-481,96,-63,481]},

ただ公式の説明を見ても、結果にどう影響があるのかよく分かりませんでした。

あまり結果は変わらない気もするんですが、空にするとラベルはobjectになるので、キャラクターとして扱いたくない場合は空にしてください。

MOSS-Image Layout Promptのcharacter_boxesの入力欄

最後にText to Image (MOSS-Image)でモデルをセットし、生成したいプロンプトを入力します。

enable_prompt_enhancerやSLGは任意で切り替えてください。

※sft t2iのworkflowだとenable_prompt_upsamplerになってますが、中身は一緒です。

レイアウト指定用のText to Image (MOSS-Image)でプロンプトとモデルを設定する画面

これでさっきのアニメプロンプトを生成すると、こんな感じでobjとtextが追加できます。

ちゃんとカモメと標識が反映できました。

Create Bounding Boxesでカモメとバス停の標識を追加して生成したアニメ画像

ちなみに左がcharacter、右がobjectのラベルで生成したものです。

結果だけ見ると、characterはカモメがちょっと強調されている気がします。

カモメのボックスをcharacter(左)とobject(右)のラベルで生成したアニメ画像の比較

一応Load Image追加すれば領域指定の目安にはできますが、i2iによる編集ではないので、読み込んだ画像は結果に反映されません。

まとめ

SFTの方がファインチューニングされているとのことなので、そっちの方が結果は良く感じました。

画像生成も遅くないし、プロンプトの追従性も良いし、フォトリアル・アニメどちらも生成できます。

ただプロンプトの書き方が悪いのか、若干フォトリアルはイマイチな印象です。

SLGで結構変わる気がするのでここらへんは検証必要かなという感じでした。

ライセンスもApache-2.0で扱いやすいし、プロンプトの書き方も自由度が高いので、扱い方としてはAnimaと似た感じのモデルかもしれません。

今後いろんな方のファインチューニングモデルとかが出たらいろいろ盛り上がりそうな気もします。

以上MOSS-Imageの使い方について紹介しました。

参考になれば幸いです。

タイトルとURLをコピーしました