Stable Diffusion系の画像生成AIで使用する、複数人数の画像生成で人物ごとの服装・髪型・ポーズ・位置関係などの指示方法についてご紹介します。

複数人数は、単純に 2girls や two people と書くだけでは、人物ごとの服装・髪型・ポーズ・位置関係などが曖昧になるという、1人の画像とは違う難しさがあります。

私の場合は、複数人数の画像を生成するときのプロンプトは「全体の指示」+「個別の指示」+「背景などの指示」と分けて指示をします。

全体の指示人物の人数を指定します。カメラの構図や共通する項目も指示します。
個別の指示ラベルを使用して各人物の特徴と髪型や服装などをそれぞれ指示します。
背景などの指示場所やライティングを指示します。

実際どの様に指示をしているかご説明していきます。

男女が歌を歌っているプロンプト

若い男女2人がコンサートホールで歌を歌っている画像を生成します。

プロンプト
master piece, photo-realistic, front view, 1young man, 1young woman, full body, standing side by side, holding a microphone, singing a song
man_1: cool japanese man, short hair, white shirt, blue jeans
woman_1: cute japanese woman, bob hair, pink idol dress
break
in concert hall, colorful stage lights

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 3253820258, Size: 768x1024, Model: z_image_turbo_1.0_q8p

全体の指示

master piece, photo-realistic, front view, 1young man, 1young woman, full body, standing side by side, holding a microphone, singing a song
傑作、フォトリアリスティック、正面からの構図、若い男性1人・若い女性1人、全身、横に並んで立っている、マイクを持つ、歌を歌っている

男1人、女1人なので 1young man, 1young woman になります。

個別の指示

複数の人物を区別するためラベルを用います。このサンプルでは男性と女性のラベルを以下の様にしています。
「man_1:」、「woman_1:」

man_1: cool japanese man, short hair, white shirt, blue jeans
男性1:クールな日本人男性、短髪、白いシャツ、青いジーンズ

woman_1: cute japanese woman, bob hair, pink idol dress
女性1:可愛い日本人女性、ボブヘアー、ピンク色のアイドル用ドレス

break
個別の指示の終わりを分からせるため「break」を入れます。

男女がどう並ぶかはモデル任せです。

背景などの指示

in concert hall, colorful stage lights
コンサートホール、色鮮やかなステージ照明

女性2人が歌を歌っているプロンプト

次は女性2人がコンサートホールで歌を歌っている画像を生成します。今度は立ち位置を指定しています。

プロンプト
master piece, photo-realistic, front view, 2girls, full body, standing side by side, holding a microphone, singing a song, dynamic action pose
girl_1: right position, cute japanese girl, bob hair, red idol dress
girl_2: left position, beautiful japanese girl, ponytail, white idol dress, one arm up
break
in concert hall, colorful stage lights

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 4108657887, Size: 768x1024, Model: z_image_turbo_1.0_q8p

全体の指示

master piece, photo-realistic, front view, 2girls, full body, standing side by side, holding a microphone, singing a song, dynamic action pose
傑作、フォトリアリスティック、正面からの構図、女性2人、全身、横に並んで立っている、マイクを持つ、歌を歌っている、躍動感のあるアクションポーズ

女性2人で 2girls になります。 前回の woman から girls にしてみました。

個別の指示

女性のラベルは、「girl_1」と「girl_2」とします。

girl_1: right position, cute japanese girl, bob hair, red idol dress
女性1:右側の位置、可愛い日本人女性、ボブヘアー、赤いアイドルドレス

girl_2: left position, beautiful japanese girl, ponytail, white idol dress, one arm up
女性2:左側の位置、美しい日本人女性、ポニーテール、白いアイドルドレス、片腕を上に上げる

break
個別の指示の終わりを分からせるため「break」を入れます。

横並びの位置指定は以下の様にしています。
right position 右側の位置
left position 左側の位置

画像生成AIでは左右の概念が曖昧なので、必ずしも左を指定したから左とはなりません。

背景などの指示

in concert hall, colorful stage lights
コンサートホール、色鮮やかなステージ照明

女性3人が歌を歌っているプロンプト

女性3人が公園の野外ステージで歌を歌っている画像を生成します。今回も立ち位置を指定しています。

プロンプト
master piece, photo-realistic, wide shot, front view, 3girls, full body, standing side by side, holding a microphone, singing a song, dynamic action pose
girl_1: right position, cute japanese girl, bob hair, red idol dress
girl_2: center position, beautiful japanese girl, twintails, pink idol dress
girl_3: left position, cute japanese girl, ponytail hair, blue idol dress
break
outdoor stage in the park, natural light

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 1522583600, Size: 1024x768, Model: z_image_turbo_1.0_q8p

全体の指示

master piece, photo-realistic, wide shot, front view, 3girls, full body, standing side by side, holding a microphone, singing a song, dynamic action pose
傑作、フォトリアリスティック、ワイドショット、正面からの構図、女性3人、全身、横に並んで立っている、マイクを持つ、歌を歌っている、躍動感のあるアクションポーズ

女性3人で 3girls にします。

個別の指示

girl_1: right position, cute japanese girl, bob hair, red idol dress
女性1:右側の位置、可愛い日本人女性、ボブヘアー、赤いアイドルドレス

girl_2: center position, beautiful japanese girl, twintails, pink idol dress
女性2:中央の位置、美しい日本人女性、ツインテール、ピンクのアイドルドレス

girl_3: left position, cute japanese girl, ponytail hair, blue idol dress
女性3:左側の位置、可愛い日本人女性、ポニーテール、青いアイドルドレス

break
個別の指示の終わりを分からせるため「break」を入れます。

横並びの位置指定は以下の様にしています。
right position 右側の位置
left position 左側の位置
center position 中央の位置

背景などの指示

outdoor stage in the park, natural light
公園の屋外ステージ、自然光

歌を歌っている女性と後ろで踊る女性2人のプロンプト

女性1人が歌を歌って、少し後ろで2人の女性が踊っている画像を生成します。

プロンプト
master piece, photo-realistic, wide shot, front view, 3girls, full body, dynamic action pose
girl_1: right position, background standing, beautiful japanese girl, bob hair, yellow idol dress, dancing
girl_2: center position, foreground standing, cute japanese girl, twintails, red idol dress, holding a microphone, singing a song
girl_3: left position, background standing, beautiful japanese girl, ponytail hair, yellow idol dress, dancing
break
in grand concert hall, colorful stage lights, dramatic lighting

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 2123809185, Size: 1024x768, Model: z_image_turbo_1.0_q8p

全体の指示

master piece, photo-realistic, wide shot, front view, 3girls, full body, dynamic action pose
傑作、フォトリアリスティック、ワイドショット、正面からの構図、女性3人、全身、躍動感のあるアクションポーズ

個別の指示

girl_1: right position, background standing, beautiful japanese girl, bob hair, yellow idol dress, dancing,
女性1:右側の位置、奥に立っている、美しい日本人女性、ボブヘアー、黄色いアイドルドレス、踊っている

girl_2: center position, foreground standing, cute japanese girl, twintails, red idol dress, holding a microphone, singing a song
女性2:中央の位置、手前に立っている、可愛い日本人女性、ツインテール、赤のアイドルドレス、マイクを持って、歌っている

girl_3: left position, background standing, beautiful japanese girl, ponytail hair, yellow idol dress, dancing
女性3:左側の位置、奥に立っている、美しい日本人女性、ポニーテール、黄色いアイドルドレス、踊っている

break
個別の指示の終わりを分からせるため「break」を入れます。

前後の位置指定は、以下の様にしています。
foreground standing 手前に立っている
background standing 奥に立っている

背景などの指示

in grand concert hall, colorful stage lights, dramatic lighting
壮大なコンサートホール、色鮮やかなステージ照明、ドラマチックなライティング

4人メンバーのバンド演奏のプロンプト

メイドの格好をした女性4人のバンド演奏の画像を生成します。

プロンプト
master piece, photo-realistic, wide shot, high angle, front view, full body, 4pepole, beautiful japanese girls, long hair, maid costume, dynamic action pose
girl_1: center position, foreground standing, holding a microphone, singing a song
girl_2: right position, middle ground standing, play electric guitar
girl_3: left position, middle ground standing, play bass guitar
girl_4: center position, background standing, play drum
break
in live house, stage lights, dramatic lighting

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 1177377284, Size: 1024x768, Model: z_image_turbo_1.0_q8p

全体の指示

master piece, photo-realistic, wide shot, high angle, front view, full body, 4pepole, beautiful japanese girls, long hair, maid costume, dynamic action pose
傑作、フォトリアル、ワイドショット、ハイアングル、正面からの構図、全身、4人、美しい日本人女性、ロングヘア、メイド服、躍動感のあるアクションポーズ

ボーカルとドラムの位置がかぶるので、ハイアングルからの撮影にしています。

個別の指示

girl_1: center position, foreground standing, holding a microphone, singing a song
少女1:中央位置、手前に立っている、マイクを持って歌っている

girl_2: right position, middle ground standing, play electric guitar
少女2:右側の位置、中景に立っている、エレキギターを弾いている

girl_3: left position, middle ground standing, play bass guitar
少女3:左側の位置、中景に立っている、ベースギターを弾いている

girl_4: center position, background standing, play drum
少女4:中央位置、奥に立っている、ドラムを演奏している

break
個別の指示の終わりを分からせるため「break」を入れます。

背景などの指示

in live house, stage lights, dramatic lighting
ライブハウス、ステージ照明、ドラマチックなライティング

4人メンバーのバンド演奏と観客のプロンプト

先ほど作成したバンドに観客を追加して画像生成します。

プロンプト
master piece, photo-realistic, wide shot, front view, full body, 4pepole, beautiful japanese girls, long hair, maid costume, dynamic action pose
girl_1: little to left of center position, background standing, play drum
girl_2: right position, middle ground standing, play electric guitar
girl_3: left position, middle ground standing, play bass guitar
girl_4: center position, foreground standing, holding a microphone, singing a song
break
in live house, view viewed from behind the audience, back of the crowd in the foreground, stage lights, dramatic lighting

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 1179542541, Size: 1024x768, Model: z_image_turbo_1.0_q8p

全体の指示

master piece, photo-realistic, wide shot, front view, full body, 4pepole, beautiful japanese girls, long hair, maid costume, dynamic action pose
傑作、フォトリアル、ワイドショット、正面からの構図、全身、4人、美しい日本人女性、ロングヘア、メイド服、躍動感のあるアクションポーズ

個別の指示

girl_1: little to left of center position, background standing, play drum
少女1:中央よりやや左の位置、奥に立っている、ドラムを演奏している

girl_2: right position, middle ground standing, play electric guitar
少女2:右側の位置、中景に立っている、エレキギターを演奏している

girl_3: left position, middle ground standing, play bass guitar
少女3:左側の位置、中景に立っている、ベースギターを演奏している

girl_4: center position, foreground standing, holding a microphone, singing a song
少女4:中央の位置、手前に立っている、マイクを持って歌っている

break
個別の指示の終わりを分からせるため「break」を入れます。

前回のままのプロンプトでは、何故かドラムの女性が指示通りにならず、メイド服を着なかったので、ボーカルの女性と順番を入れ替えました。

ボーカルとドラムが位置がかぶるので、ドラムの位置を少し左側にずらしています。

背景などの指示

in live house, view viewed from behind the audience, back of the crowd in the foreground, stage lights, dramatic lighting
ライブハウス、客席の後方から見た光景、手前に広がる観衆の後ろ姿、ステージ照明、ドラマチックなライティング

1人の女性歌手とたくさんの観客のプロンプト

多くの観衆の前で歌を歌っている歌手の画像を生成します。
観衆のプロンプトを先に記述して優先度を上げます。歌手のプロンプトを先に記述すると雰囲気が違う画像になりました。

プロンプト
masterpiece, photo-realistic, wide shot, a large crowd of people in the foreground, concert audience, many people seen from behind, watching the performance, super cute japanese 18yo woman, ponytail, idol dress, on the stage in the background, standing and holding a microphone, singing a song, in a concert hall, colorful stage lights, dramatic lighting

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 3060117449, Size: 1024x768, Model: z_image_turbo_1.0_q8p

観衆のプロンプト

a large crowd of people in the foreground, concert audience, many people seen from behind, watching the performance
手前に広がる大勢の群衆、コンサートの観客、後ろ姿の多くの人々、パフォーマンスを見ている

歌手のプロンプト

super cute japanese 18yo woman, ponytail, idol dress, on the stage in the background, standing and holding a microphone, singing a song
とても可愛らしい18歳の日本人女性、ポニーテール、アイドル衣装、背景のステージ上、マイクを手に持ち立っている、歌を歌っている

横一列に並ぶプロンプト

メイドさんを横一列に並んでいる画像を生成します。

プロンプト
masterpiece, photo-realistic, wide shot, young japanese women, maid costume, arranged in a row

設定値
Steps: 8, Sampler: UniPC Trailing, CFG Scale: 1.0, Seed: 2277471208, Size: 1024x768, Model: z_image_turbo_1.0_q8p

横一列に並ばせるには、プロンプト arranged in a row で生成できます。
人物や服装などを変えることで色々なアレンジが可能です。

まとめ

複数の人物の画像を生成する場合は、全体の指示で人数を指定し、個別指示でラベルを用いて各人物の特徴を指示していけば、全体のプロンプト数も減ってシンプルになります。

モデルによっては個別指定が多すぎると、プロンプトをちゃんと理解してくれない場合がありますので、生成するときは細部まで確認してください。