comfyui-prompt-engineer について
comfyui-prompt-engineerは、ComfyUIでの画像・動画生成向けに、モデルやアイデンティティ手法に応じたプロンプト作成を案内します。モデル別ルールや設定の目安、作成手順をまとめています。
主な機能
- 01モデル別のプロンプト構成
- 02FLUX、SDXL、SD 1.5、動画モデルに対応
- 03InstantID、PuLID、IP-Adapter FaceIDを考慮
- 04ネガティブプロンプトのテンプレート
- 05作成と確認の手順
活用シーン
- 01モデルごとのポジティブ・ネガティブプロンプト作成
- 02キャラクター LoRAのトリガーワードや可変要素の設定
- 03アイデンティティ手法に応じた顔の説明とCFG調整
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ mckruz/ comfyui-expert --skill comfyui-prompt-engineerインストール後、Claude Code で/comfyui-prompt-engineerを入力して読み込まれたか確認します。
詳細
ComfyUI プロンプトエンジニア
特定のモデルやアイデンティティ手法に合わせて最適化されたプロンプトを生成します。モデルによってプロンプトへの反応は異なります。
モデル別のプロンプトルール
FLUX.1 (dev/schnell/Kontext)
- スタイル:自然な文章による説明が最適です
- CFG:3.5-4(非常に低め)
- 品質タグ:最小限にします。FLUX では「masterpiece, best quality」は不要です
- 長さ:中程度(50-100語)
- 構成:
{subject description}, {setting}, {lighting}, {camera/style}
FLUX に適したプロンプト:
photorealistic portrait of a woman with auburn hair and green eyes, freckles across
her nose and cheeks, wearing a cream knit sweater, sitting in a cafe with warm ambient
lighting, shallow depth of field, shot on Sony A7IV, 85mm lens
FLUX に適さないプロンプト(品質タグが多すぎます):
masterpiece, best quality, 8k uhd, highly detailed, photorealistic portrait...
SDXL(RealVisXL、Juggernaut など)
- スタイル:冒頭に品質タグを付けると効果が大幅に高まります
- CFG:7-9
- 品質タグ:
masterpiece, best quality, photorealisticを含めます - 長さ:中程度から長め(50-150語)
- 構成:
{quality tags}, {trigger word}, {subject}, {details}, {setting}, {style} - 重み付け構文:
(important:1.3)や((very important))に対応しています
SDXL に適したプロンプト:
masterpiece, best quality, sage_character, photorealistic portrait of a woman,
detailed skin texture with freckles, emerald green eyes, auburn copper hair,
natural lighting from window, indoor setting, shallow depth of field,
RAW photo quality, 8k uhd, film grain
SD 1.5
- スタイル:タグベースが最適です
- CFG:7-8
- 品質タグ:必須です
- 長さ:短め(30-80語)
- 構成:
{quality}, {trigger}, {subject}, {details}, {style tags}
Wan 2.1/2.2(動画)
- スタイル:簡潔な動きの説明
- CFG:5-7
- 品質タグ:最小限にします
- 長さ:短め(20-50語)
- 重点:見た目だけでなく、動きを説明します
- 構成:
{subject}, {action/motion}, {setting}, {quality}
Wan に適したプロンプト:
young woman with auburn hair, talking naturally with gentle hand gestures,
seated at a modern desk, soft studio lighting, high quality
AnimateDiff
- スタイル:ベースモデル(SD1.5/SDXL)と同じですが、動きを表すキーワードを加えます
- 動きのキーワード:カメラや被写体の動きの説明を含めます
- 長さ:ベースモデルと同じです
アイデンティティ手法を使う場合
InstantID プロンプト
主な調整点:
- 顔の具体的な特徴は説明しないでください(モデルがそれらを反映します)
- それ以外はすべて説明してください:服装、ポーズ、設定、照明
- CFG は 4-5 にします
photorealistic portrait, wearing black leather jacket, standing in an alley,
dramatic side lighting, urban setting, moody atmosphere, 8k quality
PuLID プロンプト
主な調整点:
- 顔の説明もある程度含められます(PuLID はより寛容です)
- リアルな仕上がりには「neutral」、完全一致には「fidelity」の手法を使います
- CFG は 5-7 にします
sage_character, photorealistic portrait, green eyes visible, natural makeup,
professional headshot, neutral grey background, studio lighting
IP-Adapter FaceID
主な調整点:
- 顔ではなく、希望するスタイルを説明します
- 3D からリアルな表現への変換には weight_type「style transfer」を使います
- ベースモデルの標準 CFG を使います
photorealistic portrait, DSLR photo quality, natural skin texture,
warm indoor lighting, bokeh background, professional photography
FLUX Kontext(編集)
主な調整点:
- 画像全体ではなく、編集内容を説明します
- 何を変更するのか具体的に示します
- 何を維持するのかも記載します
Change the outfit to a formal black evening dress while keeping the face,
hair, and pose exactly the same. Add subtle jewelry.
キャラクター LoRA を使う場合
主な調整点:
- 必ずトリガーワードを最初に含めます
- LoRA が学習済みの特徴は説明しないでください
- ポーズ、服装、設定、照明など、変化する要素に焦点を当てます
sage_character, standing on a rooftop at sunset, wind blowing hair,
wearing casual summer dress, city skyline behind, golden hour lighting,
cinematic composition
ネガティブプロンプトのテンプレート
汎用ネガティブプロンプト(SDXL/SD1.5)
(worst quality:1.4), (low quality:1.4), blurry, deformed, bad anatomy,
bad hands, extra fingers, missing fingers, extra limbs, fused fingers,
text, watermark, signature, jpeg artifacts, username, error
フォトリアリズム向けネガティブプロンプト
3d render, cartoon, anime, illustration, painting, drawing, cgi,
plastic skin, smooth skin, airbrushed, video game, doll, mannequin,
oversaturated, artificial lighting
動画向けネガティブプロンプト(Wan/AnimateDiff)
static, frozen, jerky motion, low quality, blurry, distorted face,
bad anatomy, glitch, artifacts, flickering, jittery, unnatural movement
FLUX 向けネガティブプロンプト(最小限にする)
blurry, low quality, distorted, deformed, ugly, watermark, text
プロンプト作成ワークフロー
projects/{project}/characters/{name}/profile.yamlからキャラクタープロフィールを取得します- インベントリまたはユーザーの設定から対象モデルを取得します
- 上記のモデル別ルールを適用します
- 該当する場合はアイデンティティ手法の修飾要素を追加します
- LoRA を使用する場合はトリガーワードを含めます
- ポジティブとネガティブのプロンプトを作成します
- キャラクターの
generation_historyにある過去の成功例と照らし合わせて確認します - 手法の組み合わせに応じてCFG の推奨値を調整します
参考資料
references/prompt-templates.md- 例を含むテンプレートライブラリ全体references/workflows.md- ワークフロー別の CFG とサンプラーの設定- トリガーワードと特徴の説明については、
projects/のキャラクタープロフィールを参照してください
コメント
Markdown 対応