【検証】300トークンのプロンプトを30トークンに圧縮しても同じ画像が出るか?

【検証】300トークンのプロンプトを30トークンに圧縮しても同じ画像が出るか?

結論

  • 300トークンのプロンプトを30トークンまで圧縮(90%削減)しても、意図した画像は再現できた
  • no watermark 等のno形式ネガティブ(12項目・約60トークン)はCFG=1.0で全て機能しない
  • RAW photo, masterpiece, 8K UHD 等の品質タグは出力に影響しない
  • 肌テクスチャの3重記述、ライティング比率、レンズ描写は全て削除可能
  • ただし thin straps を削除するとクロップトップが半袖Tシャツに化ける — 二分探索で特定した必須要素

検証の目的

スタジオ撮影のエディトリアルポートレートでは、肌質感、ライティング、レンズ描写などを細かく指定するプロンプトが多い。本記事では、300トークンのプロンプトを段階的に圧縮し、二分探索で「削ると壊れる最小必須要素」を特定した。

実験条件

項目
モデルz-image-turbo(6B、写実特化蒸留モデル)
ステップ数8
サンプラーeuler
スケジューラーddim_uniform
CFG1.0
画像サイズ720×1280(縦長)
seed42, 77, 123(3シード固定)

元プロンプトの問題分析

まず、元プロンプト(約300トークン)を分析する。

元プロンプト(約300トークン)
editorial portrait photography, 4:5 vertical, full body shot, beautiful Korean female idol, early 20s, 9-head proportion, kneeling pose with hips slightly lifted off heels, torso twisted 15 degrees to the right showing waist-to-hip curve, back gently arched, chest naturally lifted, one hand resting on upper thigh, the other touching the floor behind for support, chin slightly raised, confident seductive gaze directly into lens, wearing a tight black bodycon mini skirt hugging every curve of her waist and hips, fabric stretched taut across round hips with visible tension at the seams, hemline riding up to mid-thigh revealing long slender legs, paired with a fitted black crop top with thin straps, black pointed stiletto heels 10cm, pale porcelain skin with cool undertone, realistic skin texture with visible pores on nose and cheeks, subtle peach fuzz on jawline and arms catching the rim light, faint subsurface scattering on ear edges and fingertips, natural skin luminosity without any oily or plastic sheen, fine collarbone and shoulder definition under soft directional light, Korean-style makeup, matte flawless base, soft brown smoky eyes, defined lashes, glossy nude-pink lips, highlighted cheekbone and nose bridge, long straight black hair past shoulders, silky with individual strand highlights, studio lighting setup, key light: large softbox from upper left 45 degrees, soft quality, rim light from behind right shoulder separating subject from dark background, lighting ratio 3:1, sculpting her waist and hip curves with shadow and highlight, subtle shadow under jaw and along the waist defining the S-curve silhouette, small round catchlight in both eyes at 10 o'clock position, dark gradient studio backdrop, clean and minimal, low camera angle at hip height shooting slightly upward to elongate legs, subject centered, legs extending toward bottom of frame, neutral color grading, accurate skin tone reproduction, shadows with subtle cool blue tone, highlights clean and warm on skin, medium contrast preserving shadow detail on body curves, sharp focus on face and body, 85mm f/2 lens rendering, smooth natural bokeh transition, no harsh optical artifacts, photorealistic, ultra-detailed skin texture with natural pores and peach fuzz, individual hair strands with studio light highlights, fabric tension and stretch marks on bodycon dress visible, accurate catchlight reflection in eyes, 8K UHD, RAW photo quality, masterpiece, no watermark, no text, no illustration, no CGI, no plastic skin, no wax feel, no airbrushed over-smoothing, no yellow undertone, no oily shine, no orange cast, no deformed anatomy, no extra fingers

CFG=1.0で機能しない要素(約60トークン)

元プロンプトの末尾に12個のno形式ネガティブが並んでいる。

要素トークン
no watermark, no text, no illustration, no CGI~12
no plastic skin, no wax feel, no airbrushed over-smoothing~12
no yellow undertone, no oily shine, no orange cast~10
no deformed anatomy, no extra fingers~8

CFG=1.0のモデルでは、ポジティブプロンプト内のno形式否定語は意図通りに機能しない。これだけで約60トークンが無駄になっている。

効果なしの品質タグ(約10トークン)

要素理由
RAW photo quality検証済みで効果なし
masterpiecebooru系タグ。写実モデルでは不要
8K UHD出力解像度はモデル固定
photorealistic写実モデルにフォトリアルを指定する冗長性

冗長な重複記述

重複内容出現箇所回数
肌テクスチャvisible pores / peach fuzz / subsurface scattering / skin luminosity / ultra-detailed skin texture with natural pores and peach fuzz5回
スカートのフィット感tight black bodycon mini skirt hugging every curve / fabric stretched taut across round hips with visible tension at the seams / fabric tension and stretch marks on bodycon dress visible3回
ライティングstudio lighting setup / key light: large softbox from upper left 45 degrees / soft quality / rim light from behind right shoulder / lighting ratio 3:1 / sculpting her waist and hip curves with shadow and highlight6フレーズ

段階的圧縮プロセス

一気に削るのではなく、段階的に圧縮して各段階でseed固定比較を行った。

ステップ1: 明らかな無駄を削除(300→75トークン)

  • no形式ネガティブ12項目を全削除(~60トークン)
  • 品質タグを全削除(~10トークン)
  • 肌テクスチャ5重記述を1回に統合(~40トークン)
  • ライティング詳細(比率、キャッチライト位置)を簡略化(~25トークン)
  • レンズ描写(85mm f/2, bokeh)を削除(~15トークン)
  • 色グレーディング詳細を削除(~20トークン)

結果: 3seedとも目視差なし。75トークンで元プロンプトと同等。

ステップ2: さらに削減(75→55トークン)

  • 10cm(ヒール高さ)を削除 → 3seedとも差なし
  • 9-head proportion を削除 → 体型に変化なし
  • pale porcelain skin を削除 → Korean idolで暗示される
  • hips lifted off heels を削除 → kneeling poseだけで再現

結果: 差なし。55トークンで同等。

ステップ3: 大胆削減(55→30トークン)

30トークン版(bold)
Korean idol woman, kneeling pose, torso twisted, gaze into lens, black bodycon mini skirt, black crop top thin straps, black stiletto heels, smoky eyes, long straight black hair, softbox lighting, dark studio backdrop

さらに以下を削除: editorial portrait photography, full body shot, beautiful, early 20s, confident seductive, Korean makeup, nude-pink lips, ライティング方向指定, low angle

実験結果

120トークン版 vs 30トークン版

seed 42seed 77seed 123
120トークン120トークン版 seed42 膝立ちスタジオポートレート120トークン版 seed77 膝立ちスタジオポートレート120トークン版 seed123 膝立ちスタジオポートレート
30トークン30トークン版 seed42 膝立ちスタジオポートレート30トークン版 seed77 膝立ちスタジオポートレート30トークン版 seed123 膝立ちスタジオポートレート

維持された要素(3/3枚): 膝立ちポーズ、ツイスト、黒クロップトップ+ミニスカート、スティレットヒール、ストレートヘア、スモーキーアイ、スタジオ背景

30トークン版は120トークン版と同等の出力を維持している。

ラボ長コメント: 300トークンが30で同じ画像出るの、元プロンプトの9割がモデルに届いてなかったってこと。肌テクスチャ5回書いても1回と変わらないの、ちょっと切ない。

18トークン版で壊れた

さらに削って18トークンにしたら衣装が崩壊した。

18トークン版(supermin・壊れた)
Korean idol woman, kneeling pose, black crop top, black mini skirt, black stiletto heels, long black hair, dark studio
seed 42seed 123
30トークン30トークン版 seed4230トークン版 seed123
18トークン18トークン版 seed42 半袖Tシャツに変化18トークン版 seed123 半袖Tシャツに変化

seed 42と123でクロップトップが半袖Tシャツに変化し、ストレートヘアがウェーブに変わった。

二分探索で原因を特定

30→18トークンで削除した6要素を「衣装・外見グループ」と「ポーズ・ライティンググループ」に二分し、どちらを戻せば復活するかテストした。

グループ戻した要素
A(衣装・外見)thin straps, bodycon, smoky eyes, straight(髪), gaze into lens
B(ポーズ・ライティング)torso twisted, softbox lighting
seed 42seed 123
グループAグループA seed42 細ストラップ復活グループA seed123 細ストラップ復活

グループAで衣装が復活。 グループBでは半袖Tシャツのまま変わらなかった。

必須要素の特定

要素必須か理由
thin straps必須crop top だけだと半袖Tシャツに化ける。ストラップの形状指定が衣装を決定する
straight(髪)必須なしだとウェーブヘアになるseedがある
bodycon推奨スカートのフィット感に寄与するが、なくても大崩れしない
smoky eyes任意雰囲気に寄与するが、メイクの大枠は Korean idol で暗示される
gaze into lens任意なくてもカメラ目線になる傾向がある

ラボ長コメント: thin straps の2トークンが300トークンのプロンプトより衣装に効いてたの、プロンプトは量より精度。

まとめ

削除しても影響がなかった要素

カテゴリ削除した要素節約トークン
no形式ネガティブno watermark 等12項目~60
品質タグRAW photo, masterpiece, 8K UHD, photorealistic~10
肌テクスチャvisible pores, peach fuzz, subsurface scattering 等の5重記述~40
ライティング詳細比率3:1, キャッチライト位置, 色温度~25
レンズ描写85mm f/2, bokeh transition~15
色グレーディングneutral color grading, cool blue tone shadows~20
暗示される属性10cm, 9-head proportion, pale porcelain skin, early 20s~15
スタイル・構図editorial portrait photography, full body shot, beautiful~10

削除すると壊れた要素

要素影響
thin strapsクロップトップが半袖Tシャツに変化
straight(髪)ストレートヘアがウェーブに変化

最適化結果

トークン削減率品質
元プロンプト~300ベースライン
75トークン版~7575%差なし
55トークン版~5582%差なし
30トークン版~3090%差なし
18トークン版~1894%衣装崩壊
推奨プロンプト(~30トークン)
Korean idol woman, kneeling pose, torso twisted, gaze into lens, black bodycon mini skirt, black crop top thin straps, black stiletto heels, smoky eyes, long straight black hair, softbox lighting, dark studio backdrop

ラボ長コメント: プロンプトの9割を削っても同じ画像が出るなら、最初から30トークンで書けばいい。余った枠で新しい要素を試すほうがよっぽど画が変わる。

関連記事