結論
- 130+トークンのプロンプトを55トークンまで圧縮しても、意図した画像は再現できた
- フラッシュ関連の4重指定、夜/暗いの3重指定など、同じ概念の繰り返しは1回で十分
She wears a deep Dark backgroundのような文法破綻したフレーズは意図通りに機能していない可能性がある- カラーパレットのメモ書き(括弧で色と対象を紐づける形式)はCLIPが理解できない
- 暗示的に効いていた要素もある —
Dark backgroundを削除したら壁が消えたため、concrete wall backgroundを明示的に追加する必要があった
検証の目的
長いプロンプトを書いていると、同じ表現を何度も繰り返したり、制作メモがそのまま残っていたりすることがある。本記事では、実際に使われていたフラッシュ撮影プロンプト(130+トークン)を分析し、冗長な表現を削除した最適化版(55トークン)で同等の画像が生成できるかを検証した。
実験条件
| 項目 | 値 |
|---|---|
| モデル | z-image-turbo(6B、写実特化蒸留モデル) |
| ステップ数 | 8 |
| サンプラー | euler |
| スケジューラー | ddim_uniform |
| CFG | 1.0 |
| 画像サイズ | 1024×1024 |
| seed | 42, 123, 777(3シード固定) |
元プロンプトの問題分析
まず、元プロンプト(130+トークン)を分析する。
元プロンプト(130+トークン)
1girl, 32yo japanese actress, full nude, Flash photography of a sitting on concrete at night, hugging her knees, She wears a deep Dark background, heart-shaped face, sharp cat-like eyes, long sleek black hair, pale ivory skin, Black polish on fingers and toes., ankle strap., Sitting on ground, knees pulled up to chest, arms wrapped around legs, head resting on knees looking at camera., Grey concrete ground, dark nighttime setting., Direct camera flash, harsh shadows behind the subject., High contrast, cool tones, stark flash lighting., Deep Blue ( Black (Hair, shadows), Grey (Concrete), Pale Ivory (Skin tone under flash), Muted Peach (Lips)
構造的エラー
| 箇所 | 問題 |
|---|---|
Flash photography of a sitting on concrete | of a の後に名詞がない。文法が破綻している |
She wears a deep Dark background | 「背景を着ている」は意味不明。2つのフレーズが誤結合されている |
ankle strap. | 何のankle strapか不明。full nudeとの整合性もない |
Deep Blue ( Black (Hair, shadows), Grey (Concrete)... | カラーパレットのメモ書きがそのまま残っている。CLIPは括弧構造のカラー割り当てを理解しない |
冗長な重複
| 重複内容 | 出現箇所 | 回数 |
|---|---|---|
| フラッシュ | Flash photography / Direct camera flash / harsh shadows behind the subject / stark flash lighting | 4回 |
| 夜/暗い | at night / Dark background / dark nighttime setting | 3回 |
| コンクリート | sitting on concrete / Grey concrete ground | 2回 |
| 膝抱えポーズ | hugging her knees / Sitting on ground, knees pulled up to chest, arms wrapped around legs, head resting on knees looking at camera | 2回 |
| 肌の色 | pale ivory skin / Pale Ivory (Skin tone under flash) | 2回 |
効果が疑わしい要素
| 要素 | 理由 |
|---|---|
High contrast | フラッシュ撮影+夜を指定すれば高コントラストは暗示される |
| カラーパレット全体 | CLIPは Black (Hair, shadows) のような括弧付きカラー割り当てを理解しない。色指定は対象に隣接させるべき(属性リーク検証) |
最適化プロセス
以下の方針で最適化した。
- 構造的エラーを修正 — 文法が壊れたフレーズを正しい表現に置換
- 重複を1回に統合 — 4重フラッシュ指定→1回、3重夜指定→1回
- カラーパレットメモを削除 — 色指定は対象に隣接配置
- 不要な要素を削除 — ankle strap、High contrast
| 削除・変更した表現 | 理由 |
|---|---|
Flash photography of a sitting on concrete → direct flash photography at night に統合 | 文法破綻の修正 + フラッシュ・夜・コンクリの重複解消 |
She wears a deep Dark background → 削除 | 構造エラー。背景は at night で暗示 |
hugging her knees → 削除 | 詳細版ポーズ記述と重複 |
dark nighttime setting → 削除 | at night と重複 |
Direct camera flash / stark flash lighting → 削除 | direct flash photography に統合済み |
harsh shadows behind the subject → harsh shadows に短縮 | 不要な修飾を削除 |
High contrast → 削除 | フラッシュ+夜で暗示 |
Deep Blue ( Black (Hair, shadows)... 全体 → 削除 | カラーパレットメモ |
Black polish on fingers and toes → black nail polish に短縮 | 色と対象を隣接 |
ankle strap → 削除 | 不要 |
実験結果
実験1: 元プロンプト vs 最適化版(壁指定なし)
最適化版から壁の指定を除いた状態で比較した。
最適化版B(壁指定なし・約50トークン)
1girl, 32yo japanese actress, full nude, direct flash photography at night, sitting on grey concrete ground, knees pulled up to chest, arms wrapped around legs, head resting on knees looking at camera, heart-shaped face, sharp cat-like eyes, long sleek black hair, pale ivory skin, black nail polish, harsh shadows, cool tones
| seed 42 | seed 123 | seed 777 | |
|---|---|---|---|
| 元(A) | ![]() | ![]() | ![]() |
| 最適化(B) | ![]() | ![]() | ![]() |
維持された要素(3/3枚): 膝抱えポーズ、フラッシュの影、夜間コンクリートの雰囲気、黒髪ロング、黒ネイル、クールトーン
変化した要素: 条件Aでは壁を背景にした構図が多いのに対し、条件Bは地面が広く写る俯瞰構図になった。元プロンプトの Dark background が壁として暗示的に機能していた可能性がある。
実験2: 壁指定を追加した最適化版
concrete wall background を明示的に追加して再検証した。
最適化版C(壁指定あり・約55トークン)
1girl, 32yo japanese actress, full nude, direct flash photography at night, sitting on grey concrete ground, concrete wall background, knees pulled up to chest, arms wrapped around legs, head resting on knees looking at camera, heart-shaped face, sharp cat-like eyes, long sleek black hair, pale ivory skin, black nail polish, harsh shadows, cool tones
| seed 42 | seed 123 | seed 777 | |
|---|---|---|---|
| 元(A) | ![]() | ![]() | ![]() |
| 最適化+壁(C) | ![]() | ![]() | ![]() |
3/3枚すべてでコンクリート壁が背景に出現し、元プロンプトと同等の構図が復元された。
結果: フラッシュの影、膝抱えポーズ、壁際の構図、クールトーン — すべての意図した要素が最適化版でも維持された。
メモ: 元プロンプトの半分以上がノイズだったことになる。カラーパレットのメモ書きが削除されずに残ったまま使われるケースは珍しくない。
まとめ
冗長なプロンプトを整理する5つのチェックポイント
- 同じ概念を何回書いているか数える — フラッシュ4回、夜3回のような重複は1回で十分
- 文法が壊れていないか確認する —
of aの後に名詞がない、「背景を着ている」など - 制作メモが混入していないか確認する — カラーパレットの括弧書きはCLIPに伝わらない
- 暗示される要素を省略する — フラッシュ+夜なら
High contrastは不要 - 削除した結果を必ず画像で確認する —
Dark backgroundが壁として機能していたように、意図しない情報の消失がありうる
今回の最適化結果
| トークン数 | 壁 | フラッシュ影 | ポーズ | |
|---|---|---|---|---|
| 元プロンプト(A) | 130+ | あり | あり | あり |
| 最適化・壁なし(B) | ~50 | なし | あり | あり |
| 最適化・壁あり(C) | ~55 | あり | あり | あり |
75トークン以内に収まり、約20トークンの余裕がある。この余裕で新しい要素(小物、表情の変化など)を追加する余地がある。
メモ: プロンプトの最適化では、「何を書くか」よりも「何を書き忘れているか」の確認が重要である。











