私的AI研究会 > ComfyUI15
「ComfyUI」を使ってローカル環境でのAI画像生成を検証する
| カナダの Ideogram(イデオグラム)社が開発した、最先端のオープンウェイト画像生成AIモデル「Ideogram 4.0」を検証してみる |
| このプロジェクトで作成するワークフローと関連データは下記にアップロードしている(更新されている場合は再度ダウンロードのこと) |
📂ComfyUI ├─📂input ← ワークフローに含まれる入力画像 └─📂user └─📂default └─📂workflows ← ワークフローの保存場所 : ├─📂~beta ├─📂Ideogram ← この章で作成するワークフロー :・解凍してできる「ComfyUI/」フォルダを「StabilityMatrix/Data/Packages/ComfyUI」へ上書きコピーする
| ワークフロー | 機 能 | モデル | CPU | CPU | |||||
| RTX 4070 | RTX 4060 | RTX 4060L | RTX 3050 | GTX 1050 | i7-1260P | i7-1185G7 | |||
| 8000_ideogram4_prompt | LLM入力プロンプト作成 | fp8 | 00:00.01 | 00:00.01 | 00:00.02 | 00:02.06 | 00:00.03 | ||
| 8001_ideogram4_t2i | Text to Image 基本ワークフロー | fp8 | 00:95.32 | 02:21.51 | 01:51.89 | 04:40.28 | × | ||
| 8002_ideogram4_t2i_simple | Text to Image 展開版ワークフロー | fp8 | 00:24.45 | 01:54.28 | 01:44.67 | 04:02.22 | × | ||
| 8010_ideogram4t2i_KJBuilder | JSON プロンプトを視覚的に操作 | fp8 | 01:20.94 | 03:58.58 | 04:27.92 | 09:44.68 | 01:37:24.07 | ||
| モデル名 | ファイル名(.safetensors) | 配置先(/StabilityMatrix/Data/) | ダウンロード URL | 共通で使用 | |
| checkpoints | ideogram4_fp8_scaled | Models/ | DiffusionModels/ | ideogram4_fp8_scaled.safetensors | |
| ideogram4_unconditional_fp8_scaled | ideogram4_unconditional_fp8_scaled.safetensors | ||||
| text_encoders | qwen3vl_8b_fp8_scaled | TextEncoders | qwen3vl_8b_fp8_scaled.safetensors | ||
| gemma4_e4b_it_fp8_scaled | gemma4_e4b_it_fp8_scaled.safetensors | HiDream-O1 | |||
| vae | flux2-vae | VAE/ | flux2-vae.safetensors | FLUX.2 | |
| ComfyUI オフィシャルサイトで公開されているテンプレートのシード値を固定して再現性を確保し動かしながら整理する |
| テンプレート名 | ワークフロー | 保存ワークフロー名 | |
| ④ | Ideogram v4: Trxt to Image | image_ideogram4_t2i.json | image_ideogram4_t2i_org.json |
| 本文(英語) | 日本語訳(AI による翻訳) |
| Text to Image (Ideogram v4) | |
| About the model The model is trained on structured JSON captions (scene summary, style block, background, and optional per-object descriptions with bounding boxes and hex color palettes). Official inference validates prompts against that schema. Guidance uses flow-matching with asymmetric classifier-free guidance (the unconditional pass drops text tokens)—not a separate negative prompt string. NOTE: If you see "Image blocked by safety filter" it is because of safety training in the model itself, ComfyUI does not have any safety filter. How to build prompts here (a) Raw input: Paste or type directly into the subgraph. You may use plain natural language, but structured JSON (as in the subgraph default) gives the most predictable layout and style control. (b) Model-assisted (LLM): Use the Ideogram4 Caption Prompt Template output with any LLM tools to obtain the JSON format prompt | モデルについて このモデルは、構造化されたJSONキャプション(シーン概要、スタイルブロック、背景、およびオプションのオブジェクトごとの説明(バウンディングボックスと16進数カラーパレットを含む))で学習されています。公式推論では、プロンプトをこのスキーマに照らし合わせて検証します。ガイダンスは、非対称分類器フリーガイダンス(無条件合格の場合はテキストトークンが破棄されます)を用いたフローマッチングを使用しており、別途否定プロンプト文字列は使用していません。 注:もし「安全フィルターにより画像がブロックされました」と表示される場合は、モデル自体の安全学習によるものであり、ComfyUIには安全フィルターは搭載されていません。 プロンプトの作成方法 (a) 生の入力:サブグラフに直接貼り付けるか入力してください。自然言語も使用できますが、構造化されたJSON(サブグラフのデフォルト設定)を使用すると、レイアウトとスタイルの制御が最も予測しやすくなります。 (b) モデル支援(LLM):Ideogram4キャプションプロンプトテンプレートの出力を任意のLLMツールで使用すると、JSON形式のプロンプトを取得できます。 |
| Ideogram4 Caption Prompt Template | |
| This is a prompt construction template. You can copy its input into any LLM to generate matching prompts. You may try installing or updating KJNodes and use the Ideogram 4 Prompt Builder KJ node to achieve visual control over prompts. | これはプロンプト作成テンプレートです。このテンプレートの入力内容を任意のLLMにコピーすることで、対応するプロンプトを生成できます。 プロンプトを視覚的に制御するには、KJNodesをインストールまたは更新し、Ideogram 4 Prompt Builder KJノードを使用してみてください。 |
| Step | 内容 |
| ① | 「Text to Image (Ideogram v4)」ノードと「Save Image」ノードをバイパスする |
| ② | 「Ideogram4 Caption Prompt Template」ノードに自然文でプロンプトを入力して「Run」(実行) |
| ③ | 「Preview as Text」ノードに出力されたテキストを LLM(Geminiなど)に貼り付ける(ChatGPT の場合は「JSON形式のプロンプトを作って」と指示する) |
| ④ | 出力された JSON形式のプロンプトを「Text to Image (Ideogram v4)」ノードに貼り付ける |
| ⑤ | バイパスを解除して「Run」(実行)して画像を生成する~ |
| mode | 主にサンプラーノード等で「生成速度、品質、忠実度」のバランスをコントロールするために設定する項目 |
| Default(デフォルト) | 処理速度と画像のクオリティ・忠実度のバランスが取れた標準的なモード。迷った際はこの設定を推奨。 |
| Quality(クオリティ) | ステップ数やプロンプトに対する忠実度を最優先するモード。より高品質で精密な画像生成が期待できるが、生成には時間がかかる。 |
| Turbo(ターボ) | ステップ数を少なくし、最速でフィードバック(生成)を得るための高速化モード。素早くアイデアや構図を確認したい場合に適する。 |
| Step 1 のワークフローを整理して「Text to Image」の基本部分だけで構成する(JSON フォーマットのプロンプトを想定) |
| Gemini に入力するテキスト | 生成画像 |
|
【Ideogram 4プロンプトガイドライン】に従って、以下の【自然文のプロンプト】の内容の画像を Ideogram 4 で生成するための JSON 形式のプロンプトを英語で生成してください。 ----- 【Ideogram 4プロンプトガイドライン】 https://github.com/ideogram-oss/ideogram4/blob/main/docs/prompting.md ----- 【自然文のプロンプト】 旅行雑誌「Ideogram」の表紙。美しくて壮大な自然の風景。上部と左右の余白に、おしゃれな雑誌のロゴ、季節の特集記事のタイトル、サブテキスト、発行月と年を配置。雑誌特有の洗練されたレイアウト、シネマティックな照明、高画質、クリアで鮮明。 | ![]() |
| Gemini が作成した JSON プロンプト | |
|
{ "prompt": "A sophisticated travel magazine cover titled 'Ideogram' in a modern, stylish serif font across the top. The background features a breathtaking and majestic natural landscape of a sun-drenched canyon with layered rock formations, capturing a sense of grand adventure. Golden hour cinematic lighting illuminates the scene, creating warm glows and deep shadows. In a clean and professional layout, seasonal feature article titles are arranged in the margins: 'WANDERLUST: THE GREAT ESCAPE' in a bold minimalist font on the left, and 'HIDDEN GEMS OF THE SEASON' with a smaller subtext on the right. The publication month and year 'JULY 2026' is subtly placed in the top right corner. The overall composition is pristine, high-resolution, clear, and sharp, perfectly mimicking a high-end travel magazine.", "aspect_ratio": "3:4", "style_type": "REALISTIC" } |
| Step 1 ワークフローの「Caption Prompt Template」部分を整理して構成する。LLM 入力用テキスト生成ワークフロー。 Ideogram4 は自然言語のプロンプト入力も扱えるようだが、本来の性能を発揮するには JSONプロンプトが推奨されている。 自然言語から JSONプロンプトを LLMを使って作成するツール。 |
| 「Ideogram」8000_ideogram4_prompt.json | 8000 SubGraph |
![]() | ![]() |
| 入力プロンプト (自然言語) | LLM 向け出力テキスト |
| 旅行雑誌「Ideogram」の表紙。美しくて壮大な自然の風景。上部と左右の余白に、おしゃれな雑誌のロゴ、季節の特集記事のタイトル、サブテキスト、発行月と年を配置。雑誌特有の洗練されたレイアウト、シネマティックな照明、高画質、クリアで鮮明。 |
| {"aspect_ratio":"896:1184","high_level_description":"A sophisticated travel magazine cover for 'Ideogram' featuring a breathtakingly grand and beautiful natural landscape photograph with professional editorial typography layered seamlessly over the top-third and side margins.","compositional_deconstruction":{"background":"A majestic mountain range at sunrise, with jagged peaks catching the first amber rays of light against a crisp, cool-neutral sky filled with soft, wispy clouds. A calm, glassy alpine lake in the lower half reflects the mountains perfectly. The global color balance is clean and natural, avoiding artificial warm grading outside of the physical sunlit highlights on the stone peaks. The entire landscape serves as a deep, receding architectural backdrop for the cover elements.","elements":[{"type":"obj","bbox":[40,150,160,850],"desc":"The primary background element of the upper frame, acting as the main magazine masthead bar that anchors the title text over the sky."},{"type":"text","bbox":[50,160,150,840],"text":"Ideogram","desc":"The main magazine title logo, rendered in an elegant, bold serif typeface, centered horizontally near the top edge. The color is a crisp, clean white that contrasts sharply with the sky behind it."},{"type":"text","bbox":[180,160,210,400],"text":"AUTUMN SPECIAL","desc":"A seasonal feature banner text, written in a clean, all-caps, light sans-serif font. It is positioned directly beneath the main logo on the left side, colored in a subtle cream tone."},{"type":"text","bbox":[220,160,320,600],"text":"THE GREAT\nESCAPE","desc":"The main feature article headline, split into two lines. It uses a bold, modern display serif typeface in pure white, commanding attention in the upper-left quadrant of the layout."},{"type":"text","bbox":[340,160,390,550],"text":"Discovering the untouched wilderness of the northern peaks.","desc":"A multi-line editorial subtext block located beneath the main headline, rendered in a small, regular upright sans-serif font with a clean white color."},{"type":"text","bbox":[180,780,210,840],"text":"ISSUE 42","desc":"Issue numbering text positioned on the upper-right side, aligned with the seasonal banner, in a light, small sans-serif font."},{"type":"text","bbox":[220,740,240,840],"text":"OCTOBER 2026","desc":"The publication month and year text, written in a small, regular sans-serif typeface, aligned vertically below the issue number along the right margin."}]}} |
|
[USER] TARGET IMAGE ASPECT RATIO: xxxx:yyyy (width:height). User idea: '自然言語体のプロンプトテキスト' |
| 縦横比 | 1.0 M pixel | 2.0 M pixel | ||
| X | Y | X | Y | |
| 1:1 (Square) | 1024 | 1024 | 1456 | 1456 |
| 2:3 (Portrate Photo) | 848 | 1264 | 1184 | 1776 |
| 3:2 (Photo) | 1264 | 848 | 1776 | 1184 |
| 3:4 (Portrate Standard) | 896 | 1184 | 1264 | 1680 |
| 4:3 (Standard) | 1184 | 896 | 1680 | 1264 |
| 9:16 (Photo Widescreen) | 768 | 1376 | 1088 | 1936 |
| 16:9 (Widescreen) | 1376 | 768 | 1936 | 1088 |
| 21:9 (UltraWide) | 1568 | 672 | 2224 | 960 |
| Step 3 でできた JSON プロンプトを入力して画像を生成する。 使用するワークフローは Step 2「8001_ideogram4_t2i.json」のSubGraph を展開した「8002_ideogram4_t2i_simple.json」 |
| Ideogram 4 Prompt Builder KJ 拡張ノードを使うと、複雑な JSON プロンプトを視覚的に操作できる このノードは現在進行形で機能のアップデートが行われている |
| Gemini に入力するテキスト | 生成画像 |
|
【Ideogram 4プロンプトガイドライン】に従って、以下の【自然文のプロンプト】の内容の画像を Ideogram 4 で生成するための JSON 形式のプロンプトを英語で生成してください。 ---- 【Ideogram 4プロンプトガイドライン】 https://github.com/ideogram-oss/ideogram4/blob/main/docs/prompting.md ----- 【自然文のプロンプト】 ファッション雑誌「Ideogram」の表紙。中央に自信に満ちた表情の日本人女性モデル。カラフルでスタイリッシュな雑誌のタイトルロゴ(英語)、大きな見出し(日本語)、特集記事のタイトル(日本語)、バーコードを配置。プロのカメラマンが撮影したような高画質、スタジオ照明、鮮やかな色合い、グラフィックデザイン。 | ![]() |
| Gemini が作成した JSON プロンプト | |
| {"aspect_ratio":"896:1184","high_level_description":"A vibrant and stylish fashion magazine cover for 'Ideogram' featuring a confident Japanese female model posed centrally in a studio setting, surrounded by professional graphic design elements, colorful typography, and a barcode.","compositional_deconstruction":{"background":"A clean, minimalist studio backdrop with a solid, light grey color. The studio lighting is professionally arranged with soft, balanced key lights and subtle rim lighting that creates a gentle separation between the model and the background, maintaining a neutral white balance across the entire canvas.","elements":[{"type":"obj","bbox":[180,200,980,800],"desc":"A confident Japanese female model standing centrally. She has shoulder-length straight black hair, a medium-light skin tone, and a bold, self-assured expression looking directly into the camera. She wears a chic, structured electric-blue blazer over a white crew-neck top and matching tailored trousers. Her pose is powerful yet elegant, with one hand resting naturally on her hip."},{"type":"text","bbox":[40,100,160,900],"text":"Ideogram","desc":"The main magazine title logo centered at the top, rendered in a bold, stylized display sans-serif typeface. The letters feature a vibrant, colorful gradient shifting smoothly from hot pink to bright orange."},{"type":"text","bbox":[220,80,300,500],"text":"未来を纏うファッション","desc":"The main feature article headline written in Japanese characters, positioned in the upper-left area. It uses a bold, modern Gothic sans-serif typeface in a crisp white color with a subtle drop shadow."},{"type":"text","bbox":[320,80,450,450],"text":"TOKYO STREET STYLE\n東京のストリートから世界へ","desc":"A two-line sub-feature article title in the mid-left section. The first line is English and the second line is Japanese, rendered in a medium-weight, clean sans-serif font in bright yellow."},{"type":"text","bbox":[750,80,830,400],"text":"秋の最新トレンド100","desc":"A secondary feature article title written in Japanese in the lower-left quadrant, using an elegant, regular-weight Mincho serif typeface in a clean white color."},{"type":"obj","bbox":[880,820,960,940],"desc":"A standard, realistic retail barcode sticker with vertical black lines and tiny numbers beneath it, neatly placed in the lower-right corner of the cover layout."}]}} |
| 入力プロンプト (自然言語) | LLM 向け出力テキスト |
| ファッション雑誌「Ideogram」の表紙。中央に自信に満ちた表情の日本人女性モデル。カラフルでスタイリッシュな雑誌のタイトルロゴ(英語)、大きな見出し(日本語)、特集記事のタイトル(日本語)、バーコードを配置。プロのカメラマンが撮影したような高画質、スタジオ照明、鮮やかな色合い、グラフィックデザイン。 |
| {"aspect_ratio":"896:1184","high_level_description":"A vibrant and stylish fashion magazine cover for 'Ideogram' featuring a confident Japanese female model centered in the frame, surrounded by bold typography, headlines, and a barcode, shot with professional studio lighting.","compositional_deconstruction":{"background":"A solid, clean studio backdrop in a rich teal color, with soft and even high-key studio lighting casting a gentle, imperceptible shadow behind the central model to create depth.","elements":[{"type":"obj","bbox":[180,200,1000,800],"desc":"Confident Japanese female model centered in the frame, looking directly into the camera with a self-assured expression. She has sleek, shoulder-length black hair with sharp bangs, a warm medium-light skin tone, and flawless editorial makeup featuring a bold red lip. She wears a structured, high-fashion blazer in a vibrant magenta hue over a simple black top, posed from the waist up."},{"type":"text","bbox":[50,100,180,900],"text":"Ideogram","desc":"The primary magazine title logo positioned at the top of the cover, overlapping the top of the model's hair. The typography is a bold, modern sans-serif typeface in a striking electric yellow color with a clean white outline."},{"type":"text","bbox":[650,80,720,600],"text":"未来のファッション","desc":"The large main headline in Japanese, positioned on the left side of the cover over the model's blazer. The text is in a bold, contemporary Gothic sans-serif typeface, rendered in solid white characters."},{"type":"text","bbox":[740,80,780,500],"text":"東京スタイル新時代","desc":"A secondary feature article title in Japanese, placed directly below the main headline. The font is a medium-weight modern sans-serif in a bright pastel pink color."},{"type":"text","bbox":[810,80,840,450],"text":"独占インタビュー","desc":"A smaller feature article subtitle in Japanese, located below the secondary title. The text is styled in a clean, light sans-serif typeface in a crisp white color."},{"type":"text","bbox":[880,80,910,550],"text":"今シーズン絶対流行るマストアイテム10選","desc":"A detailed feature article title in Japanese near the bottom left. The font is a regular-weight sans-serif, rendered in electric yellow to match the main logo."},{"type":"obj","bbox":[900,750,970,920],"desc":"Standard retail barcode white rectangle with black vertical lines, positioned horizontally in the bottom-right corner of the magazine cover."},{"type":"text","bbox":[875,750,895,920],"desc":"A string of small black numbers printed directly beneath the retail barcode lines.","text":"4 912345 678901"}]}} |