私的AI研究会 > ComfyUI15

画像生成AI「ComfyUI」15(実践編Ⅵ) == 編集中 ==

 「ComfyUI」を使ってローカル環境でのAI画像生成を検証する

▲ 目 次
※ 最終更新:2026/06/18 

『Ideogram 4.0』を検証する

 カナダの Ideogram(イデオグラム)社が開発した、最先端のオープンウェイト画像生成AIモデル「Ideogram 4.0」を検証してみる

概要

プロジェクトで作成するワークフロー

 このプロジェクトで作成するワークフローと関連データは下記にアップロードしている(更新されている場合は再度ダウンロードのこと)

画像生成のための環境構築

  1. 必要モデルのダウンロード と配置
    モデル名ファイル名(.safetensors)配置先(/StabilityMatrix/Data/)ダウンロード URL共通で使用
    checkpointsideogram4_fp8_scaledModels/DiffusionModels/ideogram4_fp8_scaled.safetensors
    ideogram4_unconditional_fp8_scaledideogram4_unconditional_fp8_scaled.safetensors
    text_encodersqwen3vl_8b_fp8_scaledTextEncodersqwen3vl_8b_fp8_scaled.safetensors
    gemma4_e4b_it_fp8_scaledgemma4_e4b_it_fp8_scaled.safetensorsHiDream-O1
    vaeflux2-vaeVAE/flux2-vae.safetensorsFLUX.2

Step 1:標準テンプレート を検証する

 ComfyUI オフィシャルサイトで公開されているテンプレートのシード値を固定して再現性を確保し動かしながら整理する
  1. ワークフローを選ぶ
    ① 左端のメニューから「Template」を選択
    ②「Video」を押す
    ③ 検索欄に「Ideogram」を入力する

    ・表示された一覧からワークフローを選ぶ
    ④「Ideogram v4: Trxt to Image」Text to Image 基本ワークフロー

    ・ワークフローでエラーが発生する場合は前項のモデルの配置を確認する

    ・生成画像 768x1376
    Ideogram_4.0_00006_m.jpg

  2. 動作確認を行ってから保存する
    テンプレート名ワークフロー保存ワークフロー名
    Ideogram v4: Trxt to Imageimage_ideogram4_t2i.jsonimage_ideogram4_t2i_org.json
    ・オリジナルのワークフロー
    comfyui_934_m.jpg
    image_ideogram4_t2i.json
     Prompt:

    A surreal streetwear mixed-media collage poster featuring a relaxed skateboarder mid-air against a vibrant blue sky, backed by giant puffy 3D letters spelling 'COMFY'. The composition blends retro magazine cutout aesthetics with grunge elements like torn paper banners and distressed red stamps, conveying
    鮮やかな青空を背景に、空中でリラックスしたスケートボーダーが描かれ、その背後には「COMFY」と綴られた巨大なふっくらとした3D文字が配された、シュールなストリートウェアのミクストメディアコラージュポスター。レトロな雑誌の切り抜き美学と、破れた紙のバナーや使い古された赤い切手などのグランジ要素を融合させた構成で、
    ・シード値を固定して整理したワークフロー
    comfyui_935_m.jpg
    image_ideogram4_t2i_org.json
    comfyui_935a_m.jpg
    SubGraph
    ・ワークフローに含まれる注意書き
    本文(英語)日本語訳(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ノードを使用してみてください。
    ●「Ideogram4 Caption Prompt Template」システムプロンプト全文 → fileideogram_system_prompt.txt

  3. 標準ワークフローの使い方
    ①「Text to Image (Ideogram v4)」ノードと「Save Image」ノードをバイパスする
    ②「Ideogram4 Caption Prompt Template」ノードに自然文でプロンプトを入力して「Run」(実行)
    ③「Preview as Text」ノードに出力されたテキストを LLM(ChatGPT等)にコピーして「JSON形式のプロンプトを作って」と指示する
    ④ 出力された JSON形式のプロンプトを「Text to Image (Ideogram v4)」ノードに貼り付ける
    ⑤ バイパスを解除して「Run」(実行)して画像を生成する

  4. JSON フォーマットのプロンプトによる生成結果
    オリジナルのプロンプト
    Ideogram_4.0_00007_m.jpg {"high_level_description": "A surreal streetwear mixed-media collage poster featuring a relaxed skateboarder mid-air against a vibrant blue sky, backed by giant puffy 3D letters spelling 'COMFY'. The composition blends retro magazine cutout aesthetics with grunge elements like torn paper banners and distressed red stamps, conveying an effortless, cozy vibe.","style_description": {"aesthetics": "Retro magazine cutout style, mixed-media digital collage, high-contrast streetwear graphic, featuring rough ripped paper edges and distressed grunge textures.","lighting": "High-contrast flash mixed with harsh midday sunlight on the skater cutout, contrasting with flat, bright graphic lighting on the 3D typography.","photo": "Vintage grainy 35mm film with distressed halftone scan textures and subtle light leaks.","medium": "Mixed-media digital collage","color_palette": ["#1E73BE", "#FDFDFD", "#C82A2A", "#657C9C", "#EFEFEF"]},"compositional_deconstruction": {"background": "A vibrant, clear blue sky layered with a vintage grainy film texture and subtle halftone dot patterns, transitioning down to an implied pale gray concrete ramp at the very bottom edge.","elements": [{"type": "obj","bbox": [128, 149, 354, 810],"desc": "Massive 3D puffy, inflatable white typography spelling 'COMFY'. The letters stretch across the upper half of the canvas, acting as a surreal, soft cloud-like backdrop.","color_palette": ["#FDFDFD", "#E0E0E0", "#D3DBE2"]},{"type": "obj","bbox": [459, 37, 727, 264],"desc": "A cluster of oversized, distressed red stamped circles and dots, applied loosely to the midground like a grunge ink stamp, partially obscuring the bottom left of the text.","color_palette": ["#C82A2A", "#A11D1D"]},{"type": "obj","bbox": [23, 366, 153, 666],"desc": "A vertically oriented, torn paper side banner pinned to the left edge. The rough-edged paper displays the bold, stamped text 'STAY COZY' in high-contrast black ink.","color_palette": ["#EFEFEF", "#1A1A1A", "#C82A2A"]},{"type": "obj","bbox": [287, 210, 756, 819],"desc": "A sharp photographic cutout of a skateboarder mid-air in a relaxed pose. He wears loose-fitting washed denim jeans and a plain white tee, appearing to effortlessly float above the concrete ramp. A distinct white cutout border surrounds his silhouette.","color_palette": ["#FDFDFD", "#657C9C", "#2B2B2B", "#DCA57D"]},{"type": "obj","bbox": [773, 39, 973, 187],"desc": "A surreal, miniature floating skateboard cutout, positioned playfully in the upper right sky as if defying gravity.","color_palette": ["#D2A679", "#2B2B2B", "#C82A2A"]},{"type": "obj","bbox": [105, 830, 905, 980],"desc": "A wide, horizontal strip of heavily textured torn paper spanning the lower third of the composition. It features the bold typographic phrase 'BEYOND THE COMFORT ZONE' intermixed with 'EFFORTLESS RIDE' alongside ripped edges that reveal the background.","color_palette": ["#EFEFEF", "#1A1A1A", "#999999"]}]}}
    「Gemini」のプロンプト
    Ideogram_4.0_00004_m.jpg {"aspect_ratio":"768:1376","high_level_description":"A surreal mixed-media streetwear collage poster in a vertical format, featuring a skateboarder mid-air against a bright blue sky with giant 3D text spelling 'COMFY', incorporating torn paper magazine cutouts and distressed red grunge stamps.","compositional_deconstruction":{"background":"A vibrant solid sky-blue background layer that forms the base of the collage, overlaid with a faint, global texture of scanned matte magazine paper and subtle halftone dot screens to unify the mixed-media composition.","elements":[{"type":"obj","bbox":[450,200,950,900],"desc":"The primary background element, a massive 3D typographic sculpture composed of five individual, giant puffy balloon-like letters spelling out the word 'COMFY'. The letters have a glossy, inflated plastic texture with soft, rounded edges and a clean white finish that catches subtle highlights along their curves."},{"type":"text","bbox":[450,200,950,900],"text":"COMFY","desc":"Giant, white 3D inflated balloon letters arranged horizontally across the lower middle section of the poster in a bold, sans-serif display style, positioned behind the skateboarder."},{"type":"obj","bbox":[200,150,750,700],"desc":"A relaxed skateboarder in mid-air, rendered as a sharp retro magazine cutout with a distinct white border around the silhouette. The skater wears an oversized black streetwear hoodie, baggy grey cargo pants, and flat-soled skate shoes, casually holding the skateboard deck beneath his feet with his left hand."},{"type":"obj","bbox":[50,40,250,950],"desc":"A long, horizontal torn paper banner stretching across the upper portion of the frame. The banner looks like a jagged scrap ripped from a vintage glossy magazine, featuring frayed white edges and a distressed, weathered texture."},{"type":"text","bbox":[80,50,220,920],"text":"STREET CULTURE CO. / ISSUE 09","desc":"Bold black sans-serif typography printed along the center of the upper torn paper banner, presented in a regular weight, all-caps format with clean tracking."},{"type":"obj","bbox":[820,50,980,350],"desc":"A prominent, circular grunge rubber stamp graphic in the top-left corner, colored in a vibrant, slightly faded crimson red. The stamp has a distressed, ink-starved texture with irregular, bleeding edges that overlap the background."},{"type":"text","bbox":[850,80,950,320],"text":"APPROVED","desc":"Distressed red grunge text inside the circular stamp, set in an all-caps, heavy bold sans-serif typeface, angled slightly upward with a weathered, stamped-ink texture."}]}}
    「ChatGPT」のプロンプト
    Ideogram_4.0_00005_m.jpg {"aspect_ratio":"768:1376","high_level_description":"A streetwear-inspired mixed-media collage poster featuring a relaxed skateboarder suspended mid-air in front of giant puffy 3D letters spelling 'COMFY', combining retro magazine cutout aesthetics, torn paper graphics, and distressed stamp elements in a bold editorial graphic design composition.","compositional_deconstruction":{"background":"Bright blue daytime sky with soft white clouds filling the frame. Layered collage-paper textures and subtle magazine-print imperfections appear throughout the composition. The overall design uses a graphic-design poster aesthetic with distressed paper edges and scattered grunge wear marks integrated into the layout.","elements":[{"type":"obj","bbox":[180,220,760,760],"desc":"Young skateboarder mid-jump, light skin tone, short dark hair, relaxed facial expression. Wearing an oversized beige hoodie, loose dark cargo pants, white sneakers, and a black beanie. One hand loosely extended while performing a casual aerial trick on a skateboard beneath the feet."},{"type":"obj","bbox":[250,80,620,930],"desc":"Large puffy three-dimensional lettering forming the word COMFY. Inflated rounded shapes with soft white material and subtle shadows between letterforms, occupying most of the central background as the primary graphic element."},{"type":"text","bbox":[320,130,540,880],"text":"COMFY","desc":"Very large bold display typography integrated into oversized puffy three-dimensional letter forms positioned behind the skateboarder."},{"type":"obj","bbox":[690,90,790,500],"desc":"Torn paper banner with rough ripped edges, off-white paper texture, layered beneath the main subject and partially overlapping the lower portion of the composition."},{"type":"obj","bbox":[130,640,280,900],"desc":"Distressed rectangular red stamp graphic with worn ink texture and irregular edges, tilted slightly and layered over the collage design as a bold editorial accent."},{"type":"text","bbox":[150,670,250,880],"text":"STREET CULTURE","desc":"Bold uppercase sans-serif text inside the distressed red stamp graphic, slightly weathered and imperfectly printed."},{"type":"obj","bbox":[800,150,930,880],"desc":"Collection of overlapping magazine-cutout paper fragments with irregular borders, arranged as layered collage accents around the skateboarder and typography."}]}}

Step 2:Text to Image 基本ワークフロー

 Step 1 のワークフローを整理して「Text to Image」の基本部分だけで構成する(JSON フォーマットのプロンプトを想定)

Step 3: Ideogram4 Caption Prompt Template プロンプト作成ワークフロー

 Step 1 ワークフローの「Caption Prompt Template」部分を整理して構成する。LLM 入力用テキスト生成ワークフロー。
 Ideogram4 は自然言語のプロンプト入力も扱えるようだが、本来の性能を発揮するには JSONプロンプトが推奨されている。
 自然言語から JSONプロンプトを LLMを使って作成するツール。

Step 4:Text to Image 展開版ワークフロー

 Step 3 でできた JSON プロンプトを入力して画像を生成する。
 使用するワークフローは Step 2「8001_ideogram4_t2i.json」のSubGraph を展開した「8002_ideogram4_t2i_simple.json」

Step 5:JSON プロンプトを視覚的に操作する

  Ideogram 4 Prompt Builder KJ 拡張ノードを使うと、複雑な JSON プロンプトを視覚的に操作できる
 このノードは現在進行形で機能のアップデートが行われている
 

忘備録

ローカルマシンで生成したideagram 4.0 の生成物を 個人のwebサイトに発表できるか(AIによる回答)

  1. 個人の非営利Webサイトでの発表
    ・個人のブログや趣味のポートフォリオサイトなど、収益を生まない非商用目的での発表は可能
    ・現在公開されている Ideogram 4.0 のオープンウェイト版は、研究や非商用目的での利用が許可されている

  2. 収益化している個人サイトでの発表
    ・アフィリエイト広告や有料コンテンツ、商品の宣伝など商用目的が含まれるWebサイトでの発表は、別途商用ライセンスの取得が必要
     公式APIを利用して生成した場合:Ideogram API を利用して生成した画像は、通常の商用利用の範囲に含まれる
     オープンウェイトモデルをローカルで動かした場合:Hugging Face で公開されているウェイトを直接使って商用利用を行うには、個別の商用ライセンス契約が求められる

  3. 著作権と他者の権利侵害への注意
    ・発表する際は、以下の点に留意すること
     自身の著作権について:AIが自律的に生成した画像は、人間の創作的な寄与が認められない場合、著作権法上の「著作物」として保護されない可能性がある
     他者の権利について:他のアーティストの作風を強く模倣した場合や、既存の商標・著作物に類似している場合、著作権侵害や商標権侵害のリスクが生じる
      公開前に、他者の権利を侵害していないか確認することが推奨される
 

更新履歴

 

参考資料