見出し画像

画像生成はプロンプト生成 | わたしのやってること

ChatGPT-4oで世界観を設定して、最初のストーリーを少し書けば、どんどん物語を作ってくれるし、「そのシーンの画像を生成して」と言えば、DALL-E3がすぐに画像を作ってくれます。

でもこれだと、気に入った絵がすぐに出ることもありますが、何回かやり直したくなることもあります。それなら、画像を生成させるより、プロンプトを生成したほうが効率がいいです。

GPTsの作成

ChatGPTはGPTsを自分で作ることができるので、次のような指示でプロンプトクリエイターを作っておきます。

・「設定:」で始まる文は世界観やキャラクターの設定なので覚えておいてください。
・シーンのプロットを指定するので、それをデジタルアート風の画像で描くためのDALL-Eのプロンプトをコードボックスで表示してください。
・コードを表示したら、追加の条件が無いか聞いてください。
・「次」を言ったら、次のシーンのプロットを聞いてください。

なんとなくこんな感じです。適当にやって動かしてみて、思った通りに動いてくれなければ、最初からやり直せば大丈夫です。アニメ風にしたいとか、リアリスティックにしたいとか追加の要求があれば、後からでも追加することができます。

餅は餅屋

プロンプトを作るGPTsと、画像を生成するGPTsをそれぞれ作ろうかと思いましたが、画像生成に関しては立派なGPTsが存在してました。その名も「DALL・E」です。プロンプトや設定を書けば、2枚の画像を生成してくれます。

3つのチャットで生成

ストーリーも作りながら、画像を作るときは3つのチャットを別々に動かしながら生成を進めています。

ストーリー用

普通のChatGPT-4oのチャットです。ある程度自分でキャラクターを設定して、細かいところは任せてしまえば、いい感じに設定してくれます。なんなら丸投げしても何か考えてくれます。

世界観やキャラクターが設定出来たら、「キャラクターの見た目の設定を書き出して。髪の色や長さ、目の色、衣装の色や特徴など」っていえば、つらつらと書き出してくれます。

プロンプト用

ストーリー用のところで出てきたキャラクターの見た目の設定を、自作のGPTsであるプロンプトクリエイターに伝えます。

そして、こんなシーンとか、こんなポーズとか、何してるところとかリクエストすれば、設定されたキャラのその通りのシーンのプロンプトが出てきます。

プロンプトは「コードボックス」で表示させているので、コピーも楽ちんです。

画像生成用

画像生成は既存のGPTs「DALL・E」です。同時に2枚ずつ生成してくれるので効率もよいです。ポリシーに反したものは生成してくれませんが、そのエラーが出たときは、「ポリシーに反しないように修正して」と言えば、いい感じに直してくれます。暴力的なものやセクシャルなものがポリシー違反になります。

試しにやってみよう

今回、ストーリーは作りませんが、ChatGPT-4oの普通のチャットでキャラを作らせて、プロンプトクリエイターGPTsに渡して、プロンプトをDALL・Eに渡して画像生成するまでをやってみます。

普通のチャットでキャラ設定

今回は丸投げでいきます。

ファンタジー世界のキャラクターを設定します。ヒロインたちはビキニアーマーを着ています。それぞれが個性的な武器を装備しています。まず3人設定して、見た目を書きだしてください。髪の色と長さ、目の色、服の色、武器の特徴などです。

自分のアイデアは何もありません。全部お願いします。
すると速攻でこんなのが返ってきました。

### キャラクター設定

#### キャラクター1: エリス
- **髪の色と長さ**: 深いエメラルドグリーンの長い髪、腰までの長さで、ゆるやかなウェーブがかかっています。
- **目の色**: 鮮やかな紫色
- **服の色**: 銀と青を基調としたビキニアーマー、肩には銀色の肩当てがついています。
- **武器の特徴**: 光輝く長い槍、槍の先端は魔法のエネルギーで輝き、攻撃時に光の刃が放たれます。

#### キャラクター2: リアナ
- **髪の色と長さ**: 鮮やかな赤色のショートヘア、耳までの長さで、元気いっぱいのボブカット。
- **目の色**: 明るい緑色
- **服の色**: 黒と赤を基調としたビキニアーマー、胸元には赤い宝石がはめ込まれています。
- **武器の特徴**: 両手持ちの大剣、剣の刃には古代のルーン文字が刻まれており、炎のエフェクトが常に漂っています。

#### キャラクター3: セリーヌ
- **髪の色と長さ**: 純白の長い髪、足元までの長さで、まっすぐで絹のような質感。
- **目の色**: アクアブルー
- **服の色**: ゴールドと白を基調としたビキニアーマー、腰には白い羽飾りがついています。
- **武器の特徴**: 長弓、弓の中央には水晶の宝珠が埋め込まれており、矢を放つ際に魔法のエネルギーを込めることができます。

これらのヒロインたちは、それぞれの個性と装備でファンタジーの世界を冒険し、戦います。

プロンプトクリエイターGPTsに

ChatGPTの会話は簡単にコピーできるので、そのままプロンプトクリエイター貼り付けます。
すると、

了解しました!では、エリス、リアナ、セリーヌの3人のキャラクター設定に基づいて、デジタルアート風のプロンプトを作成します。

markdown
コードをコピーする
A digital art depiction of three fantasy heroines.
1. **Elis**: She has long, deep emerald green hair with loose waves reaching her waist, and vibrant purple eyes. She wears a silver and blue-themed bikini armor with silver shoulder pads. She wields a glowing long spear with a magical energy tip that emits a blade of light during attacks.
2. **Riana**: She has short, vivid red hair in a lively bob cut up to her ears, and bright green eyes. She wears a black and red-themed bikini armor with a red gemstone embedded in the chest. She wields a large two-handed sword with ancient runes etched on the blade, always surrounded by a fiery effect.
3. **Celine**: She has long, pure white hair that reaches down to her feet, straight and silky. She has aqua blue eyes and wears a gold and white-themed bikini armor with white feather decorations at her waist. She wields a longbow with a crystal orb embedded in the center, infusing magical energy into her arrows when shot.

The illustration should have a balanced 3D effect, with moderate shading and highlights to give depth, avoiding flat or overly realistic 3D renderings.
次のシーンのプロットを教えてください。

と、いきなり設定がそのままプロンプトに変換されてしまいましたが、これは無視して、シーンを伝えましょう。エリスが主人公っぽいので、エリスの攻撃シーンを作ってみます。

エリスが敵を攻撃している

指示はこれだけです。

了解しました!エリスが敵を攻撃しているシーンのデジタルアート風プロンプトを作成します。

markdown

コードをコピーする

A digital art depiction of Elis attacking an enemy. Elis has long, deep emerald green hair with loose waves reaching her waist, and vibrant purple eyes. She wears a silver and blue-themed bikini armor with silver shoulder pads. She wields a glowing long spear with a magical energy tip that emits a blade of light during attacks. In the scene, Elis is mid-attack, her spear extended forward as the magical energy tip glows brightly, releasing a blade of light towards a shadowy enemy figure. The background features a dynamic, action-filled fantasy landscape with vivid colors and dramatic lighting. The illustration should have a balanced 3D effect, with moderate shading and highlights to give depth, avoiding flat or overly realistic 3D renderings.

次のシーンのプロットを教えてください。

DALL・Eに

で、このプロンプトをDALL・Eに渡します。するとこんな返答が

I encountered issues while generating the images. If you have any other requests or need modifications, please let me know!

あー、問題があって画像が作れませんって言ってます。「攻撃」とかがダメだった予感がします。ちょっとやり直してみます。プロンプトクリエイターに戻って。

エリスが武器を構えている

すぐにプロンプトができます。

A digital art depiction of Elis poised with her weapon. Elis has long, deep emerald green hair with loose waves reaching her waist, and vibrant purple eyes. She wears a silver and blue-themed bikini armor with silver shoulder pads. She is holding her glowing long spear with a magical energy tip that emits a blade of light. In this scene, Elis stands in a ready stance, her spear held firmly in both hands, pointed forward as if anticipating an attack. The background shows a mystical, fantasy environment with glowing runes and ethereal lighting, enhancing the intensity of the moment.

The illustration should have a balanced 3D effect, with moderate shading and highlights to give depth, avoiding flat or overly realistic 3D renderings.

これをDALL・Eに渡して出来たのがこちら。1枚しか出来ませんでした。

ちょっと主人公では無いな

もう一つくらいやってみます。

リアナとセリーヌが森を歩いている

これだけでプロンプトができます。

A digital art depiction of Riana and Celine walking through a forest. Riana has short, vivid red hair in a lively bob cut up to her ears, and bright green eyes. She wears a black and red-themed bikini armor with a red gemstone embedded in the chest. Celine has long, pure white hair that reaches down to her feet, straight and silky, with aqua blue eyes. She wears a gold and white-themed bikini armor with white feather decorations at her waist. In this scene, they are walking side by side through a lush, enchanted forest with towering trees, dappled sunlight filtering through the leaves, and a carpet of vibrant green foliage underfoot. Riana is leading the way with a confident stride, while Celine walks gracefully beside her, her long hair flowing behind her. The background features magical elements such as glowing plants and mysterious creatures peeking from behind the trees, enhancing the mystical atmosphere.

The illustration should have a balanced 3D effect, with moderate shading and highlights to give depth, avoiding flat or overly realistic 3D renderings.

今回は2枚出来ました。

武器は持ってないのか
奥にいるの誰?

ちょっと大人しめなので、もうひとつくらい。

リアナとセリーヌが敵に向かって駆け出している

プロンプトが出来ました。

A digital art depiction of Riana and Celine charging towards an enemy. Riana has short, vivid red hair in a lively bob cut up to her ears, and bright green eyes. She wears a black and red-themed bikini armor with a red gemstone embedded in the chest. She wields a large two-handed sword with ancient runes etched on the blade, always surrounded by a fiery effect. Celine has long, pure white hair that reaches down to her feet, straight and silky, with aqua blue eyes. She wears a gold and white-themed bikini armor with white feather decorations at her waist. She wields a longbow with a crystal orb embedded in the center, infusing magical energy into her arrows when shot. In this scene, Riana and Celine are mid-run, charging towards a shadowy enemy figure in the distance. Riana is in the lead, her fiery sword glowing with intensity, while Celine follows closely, her longbow drawn and ready. The background shows a dramatic, battle-scarred landscape with dark clouds and flashes of light, adding to the sense of urgency and action.

The illustration should have a balanced 3D effect, with moderate shading and highlights to give depth, avoiding flat or overly realistic 3D renderings.

動きのあるいい感じになりました。

弓が浮いてる

設定がちょっと混ざってますね。これはプロンプトを作るときの工夫で回避することもできます。2人いることや左右のどっちが誰とかまで伝えておくとうまくいったりいかなかったり。

以上です。このプロンプトは、Stable Diffusionに持って行っても使えます。そっちだともっと…。


せっかくなのでもうちょっと画像生成してみた。

この記事が参加している募集

この記事が気に入ったらサポートをしてみませんか?