私的AI研究会 > ComfyUI14a

画像生成AI「ComfyUI」14(実践編Ⅳ2) == 編集中 ==

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

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

『HiDream-O1-Image』を検証する2

ローカル LLM でプロンプト・エンハンサー

「HiDream-O1-Image」のプロンプト・エンハンサーを「Ollama + OpenWebUI」を利用したローカルLLM で実現する
  1. 事前準備
    ・「open_webui」をアップデートする(Anaconda 環境)
      Windows  「Anaconda PowerShell」から
    (base) PS > conda activate open-webui
    (open-webui) PS > $env:DATA_DIR="C:\anaconda_win\workspace_3\open-webui\data"
    (open-webui) PS > $env:DATA_DIR
    (open-webui) PS > pip install -U open-webui
      Linux  「Anaconda ターミナル」から
    (base) $ conda activate open-webui
    (open-webui) $ export DATA_DIR=$HOME/workspace_3/open-webui/data
    (open-webui) $ echo $DATA_DIR
    (open-webui) $ pip install -U open-webui
    ・「gemma4:e4b」モデルをインストールする
     ターミナルから次のコマンドを実行する
    ollama pull gemma4:e4b

  2. 「Gemini」でシステムプロンプトを作成する

    オフィシャルサイト のシステムプロンプトをテキストファイルにする
      → fileHiDream_system_prompt.txt

    ②「Gemini」でこのファイルから OpenWebUI 用のシステムプロンプトを作成する
    このテキストファイルは HiDream-Image O1 のプロンプト・エンハンサーのシステムプロンプトです。これと同じ機能を Open WebUI で実現しようと思います。システムプロンプトを英語で作成してください。日本語訳もお願いします(テキストファイル添付)
    〇 JSON フォーマットのプロンプト作成
    出力をJSONではなく、ピュアテキストにしてください
    〇 システムプロンプト
    「」で囲まれた日本語テキストが英語に翻訳されてしまいます。日本語のままにするには?
    〇 強化版システムプロンプト
    この強化版システムプロンプトの全文を日本語でお願いします
    〇 日本語強化版システムプロンプト
    ③ 最終的に作成されたピュアテキスト(強化版)をシステムプロンプトとして利用する
    ▼ Gemini が作成したシステムプロンプト(JSON):英語 / AIによる日本語訳
    ▼ Gemini が作成したシステムプロンプト(TEXT):英語 / AIによる日本語訳
    ▼ Gemini が作成したシステムプロンプト(強化版):英語 / AIによる日本語訳

  3. 「OpenWebUI」を起動して http://localhost:8080 を開く

    ①「ワークスペース」を選択
    ②「新規作成」を押す

  4. 新しくモデルを登録する

    ③ モデル名を「HiDream-O1」とする
    ④ ベースモデルに「gemma4:e4b」を選択する
    ⑤ システムプロンプトを入力する
     「gemini」が出力したシステムプロンプト(日本語)をそのまま使用する
    ⑥「保存して作成」を押す

    ⑦ このモデルを利用して HiDream-O1 のプロンプトを作成する


  5. OpenWebUI で作成したプロンプトでの生成例
    ① クローズアップポートレート 2304x1728
     around,7110_2026-06-03_00006_m.jpg20代の若い女性のクローズアップポートレート。ナチュラルメイク、柔らかな表情。
    85mmレンズ、f/1.4、浅い被写界深度、背景のボケ。
    左から差し込む柔らかな窓の光、ゴールデンアワーの輝き、温かみのある肌色。
    映画のような、リアルな、細部までこだわった、プロフェッショナルな写真。
    注意点:彩度過度、アニメ調、低解像度、歪んだ顔。
    A breathtaking, cinematic close-up portrait of a young woman in her early twenties, exuding a natural, gentle, and soft expression. She is perfectly lit by soft, diffused natural light streaming in from the left side, capturing the warm, golden glow of the late afternoon (Golden Hour). Her makeup is minimal and enhancing, accentuating her natural beauty and warm skin tones. The composition uses an 85mm lens at an aperture of f/1.4, creating an extreme shallow depth of field (bokeh) that beautifully blurs the background into soft, painterly circles of light. The focus must be razor-sharp on her eyes and facial features, emphasizing highly detailed skin texture and the subtle contours of her face. The overall aesthetic should be hyper-realistic, professional fine art photography, capturing the warm, diffused quality of light, while strictly avoiding oversaturation, anime styling, low resolution, or any facial distortion.
    ▼ ① LLM の回答 / プロンプトの日本語訳
    ② 文字の入ったカタログ 1728x2304
     around,7110_2026-06-03_00004_m.jpgミニマルなワイヤレスイヤホンの、高級感あふれるバイリンガル(日本語+英語)ポスター広告です。
    マットブラックの表面に、プレミアムスタジオ照明、金属エッジの柔らかなハイライト、深くコントロールされた陰影、そして完璧な色彩精度で製品を映し出します。
    テクスチャは洗練され、触感があり、微細なディテールまで鮮明で、高級感のある商業的な仕上がりを実現します。
    ポスターは、エレガントでハイファッションな美学に基づき、十分なネガティブスペース、バランスの取れた構成、そして最小限の視覚的ノイズでデザインします。
    洗練されたモノクロパレットに、さりげないゴールドまたはシルバーのアクセントを加え、高級感を強調します。
    簡潔な英語の見出し「Pure Sound. Perfect Silence.」を記載します。
    洗練されたタイポグラフィで日本語の見出し「純粋な音・静寂の極み」を追加します。
    その下に、小さなバイリンガルのタグライン「Wireless Crafted Quality・職人技が宿る仕上り」を配置します。
    テキストは、製品から気を散らすことなく、デザインに自然に溶け込むようにしてください。
    背景は、高級感のある滑らかなグラデーションのチャコールブラックにしてください。
    中央配置、縦長の3:4アスペクト比、ロゴや透かしは使用しないでください
    A highly sophisticated, minimalist commercial studio poster advertising premium wireless earphones. The main subject, the wireless earphones, are rendered in matte black, showcased centrally, appearing to float against a smooth, deep charcoal gradient background. The design emphasizes extreme negative space and high-fashion elegance. The lighting is dramatic and precise: a premium studio setup utilizing soft, diffused key lights to highlight the metallic edges with subtle, controlled silver or gold accents, creating deep, rich shadows and perfect specular reflections on the matte black surfaces. The texture must appear exquisitely tactile, with sharp focus on every microscopic detail, conveying top-tier commercial quality. The composition follows a vertical 3:4 aspect ratio, maintaining perfect balance. The typography is clean, modern, and integrated seamlessly into the design. At the upper third, the English headline reads, "Pure Sound. Perfect Silence." In a refined, elegant Japanese calligraphy style, directly below the English, the main headline reads "純粋な音・静寂の極み". Finally, positioned subtly near the bottom edge, the smaller bilingual tagline is displayed: "Wireless Crafted Quality・職人技が宿る仕上り". The typography should use a sophisticated, thin sans-serif font, colored in a muted, brushed silver, ensuring it enhances the luxury feel without drawing focus from the product. Shot with an 85mm prime lens, extremely shallow depth of field, soft cinematic gradient, high dynamic range, hyper-detailed.
    ▼ ② LLM の回答 / プロンプトの日本語訳
    ③ ドリップコーヒー 2304x1728
     around,7110_2026-06-03_00003_m.jpgコンテストレベルの技術を持つサードウェーブの日本人バリスタによる、ドリップコーヒーの超詳細な断面クローズアップ、コーヒー粉に同心円状の波紋を描く完璧な注ぎ口、96℃のお湯から抽出までの正確な温度勾配の視覚化、細胞構造が目に見える個々のコーヒー粉、ボリュームのある照明で照らされた蒸気、木目模様が見えるヒノキ材のカウンターを備えた日本のミニマリストコーヒーバーのセッティング、東向きの窓から正確に32度の角度で差し込む朝日、磨かれた真鍮製の器具への反射、Canon EOS R3とCanon RF 100mm F2.8 L MACRO IS USM(f/4)で撮影、16ビットの色深度、45の個別フレームにわたるフォーカススタック、本物のコーヒーショップの環境音の視覚化、クレマの微細な泡、液体物理学の科学的正確さ、黄金比抽出ポイントでの正確なタイミング、アルバート・ワトソンの照明とアーヴィング・ペンの構図、感情的なつながりを伴う完璧な技術的
    An extremely hyper-realistic, cinematic macro photograph capturing the peak moment of a high-level drip coffee extraction process, executed by a Japanese third-wave barista, conveying a sense of technical perfection blended with artistic passion. The composition focuses tightly on the coffee grounds within the dripper, where a perfectly formed, concentric ripple pattern is being drawn by the stream of water—the heart of the action. The scene is set in a minimalist Japanese coffee bar featuring a visible, textured Hinoki wood counter. Intense, volumetric morning sunlight streams in at a precise 32-degree angle from a window facing east, creating strong highlights and deep shadows. The subject coffee grounds must be rendered with visible cellular structures, showing the scientific precision of the liquid physics. The water itself is visually rendered to demonstrate the temperature gradient, starting from 96°C. The macro shot must capture the delicate, micro-foamed crema forming at the surface, emphasizing the scientific accuracy and the golden ratio extraction point timing. Reflections on highly polished brass brewing tools are critical. The entire image should possess the dramatic, controlled lighting of Albert Watson, combined with the masterful composition of Irving Penn. Shot with a Canon EOS R3 and a Canon RF 100mm F2.8 L MACRO IS USM at f/4, requiring a 45-frame focus stack, deep depth of field for extreme detail, 16-bit color depth, and a tangible sense of motion frozen in time.
▼ ③ LLM の回答 / プロンプトの日本語訳
④ コマーシャル商品写真(化粧品) 2048x2048
 around,7110_2026-06-03_00005_m.jpg「L'Eau de HiDream」という高級バナナの香りの香水瓶のプロフェッショナルな製品写真。ボトルは金色の色合いのガラス製で、白い大理石のテーブルの上に置かれている。その横には、「L'Eau de HiDream」というテキストがセリフ体の金箔フォントでエレガントに印刷されたスタイリッシュな黄色い箱がある。柔らかなスタジオ照明、浅い被写界深度、ブランド名に鋭い焦点、リアルな質感、4k品質。
A hyper-detailed, luxurious product photograph of a perfume bottle, named "L'Eau de HiDream," displayed on a pristine white marble surface. The composition is minimalist, focusing entirely on the elegance and craftsmanship of the bottle. The perfume bottle should have a distinct, subtle tropical gold accent, evoking the rich essence of the fragrance.

The accompanying packaging is a rigid, premium box in a creamy off-white or champagne hue. On the visible surface of the box, the brand name "L'Eau de HiDream" must be rendered in highly reflective, embossed gold foil lettering.

Key Details:

Lighting: Utilize soft, dramatic studio lighting (softbox diffusion) that creates gentle specular highlights on the glass and metallic accents, emphasizing depth and luxury.
Texture & Material: Extreme attention to detail on the glass texture, the marble reflection, and the embossed foil quality.
Vibe: High-end, luxurious, sophisticated, and ethereal.
Camera/Style: Shot with a macro lens, f/2.8 aperture, shallow depth of field (bokeh effect) to isolate the product.
(Negative prompts: cartoon, illustration, amateur, blurry, dull colors)
▼ ④ LLM の回答 / プロンプトの日本語訳
⑤ コマーシャル商品写真(コーヒー) 2048x2048
 around,7110_2026-06-04_00001_m.jpgマットブラックのコーヒーバッグを素朴な木製のテーブルに置いた、プロフェッショナルなコマーシャル商品写真。パッケージには金色のラベルが貼られ、エレガントなセリフフォントで「MORNING BREW」とはっきりと書かれ、その下に小さく「100% ARABICA」と書かれています。バッグの横には、淹れたてのコーヒーが入った白い陶器のカップが置かれ、湯気が立ち上っています。周囲には焙煎されたコーヒー豆が散らばっています。温かい朝の陽光、ドラマチックな影、高コントラスト、4K広告品質。
A highly detailed, professional commercial product photograph capturing a rich, cozy morning coffee ritual. The main focus is on a matte black coffee bag resting on a rustic, distressed wooden table surface. Affixed to the front of the bag is an elegant golden label that prominently displays the text "MORNING BREW" in a classic serif font, with smaller supporting text underneath reading "100% ARABICA". Positioned immediately next to the bag is a clean white porcelain cup filled with freshly brewed coffee, from which soft wisps of steam gently rise. Scattered across the table surface around the core items are several perfectly roasted, dark brown coffee beans, adding texture and depth. The scene must be illuminated by warm, directional golden hour sunlight streaming in from the side (sidelighting), creating dramatic, pronounced shadows and high contrast that emphasize the matte finish of the bag and the steam. Use a low-angle shot with an 85mm lens and shallow depth of field to keep the focus sharp only on the coffee bag and cup while softly blurring the background bokeh. Ultra photo-realistic, cinematic commercial quality, 4K advertising resolution, deep saturation, warm color palette.
▼ ⑤ LLM の回答 / プロンプトの日本語訳
 

更新履歴

 

参考資料