「プロンプトを考えるのが面倒だ・・・」
「ChatGPTにStable Diffusionのプロンプトを出力させたい」
このような場合には、この記事の内容が参考になります。
この記事では、ChatGPTを用いたプロンプトの作成方法について解説しています。
本記事の内容
- ChatGPTにStable Diffusionのプロンプトについて学ばせる
- ChatGPTによるプロンプトの出力
それでは、上記に沿って解説していきます。
ChatGPTにStable Diffusionのプロンプトについて学ばせる
ChatGPTにStable Diffusionのプロンプトについて学ばせます。
そのためには、ブラウジング機能が有効である必要があります。
私は、WebPilotを利用しています。
WebPilotを有効にした状態でチャットを開きます。
そして、次のようにプロンプトを入力します。

次のページを読み込んでください。
https://stable-diffusion-art.com/prompt-guide/
https://stable-diffusion-art.com/how-to-come-up-with-good-prompts-for-ai-image-generation/
読み込みが完了すると、次のようにChatGPTが返答してくれます。

次のように続きます。

これで、ChatGPTはStable Diffusionのプロンプトについて理解したはずです。
念のため、確認します。

Stable Diffusionについては、理解できましたか?

問題なさそうですね。
これで、ChatGPTはプロンプトも出力できるようになったはずです。
なお、似たようなモノにPhotorealisticがあります。
Photorealisticでも、プロンプトが出力できます。
ただ、ChatGPT自体がプロンプトを考えているわけではありません。
あくまで、Photorealistic側との仲介をしているだけです。
以上、ChatGPTにStable Diffusionのプロンプトについて学ばせることについて説明しました。
次は、ChatGPTによるプロンプトの出力を説明します。
ChatGPTによるプロンプトの出力
同じセッション(チャット)のまま、次のようなプロンプトを入力します。

次の内容について、Stable Diffusionのプロンプトを考えてください。
未来都市を独り寂しく彷徨うチワワ
返答は、以下。

プロンプトの細かいルールに従って、出力しているようです。
正直、私はここまで意識してプロンプトを作成できていません・・・
では、それぞれのプロンプトを検証してみましょう。
モデルは、SDXL 0.9を利用します。
もちろん、SD 1.5ベースのモデルを利用しても構いません。
以下にそれぞれのプロンプトと出力された画像を表示します。
Futuristic cityscape at night with a lonely Chihuahua wandering alone.

Digital painting of a Chihuahua wandering alone in a neon-lit futuristic city.

3D rendering of a lonely Chihuahua wandering through an expansive, high-tech future city.

Concept art of a small Chihuahua wandering alone in a vast, futuristic city filled with towering skyscrapers and bright neon lights.

それぞれに特色を感じることができます。
まあ、3番目と4番目は結構似ていますけどね。
でも、すべて意図した通りの画像が生成できています。
チワワが可哀そうになってくるほどです。
以上、ChatGPTによるプロンプトの出力を説明しました。
追記 2023年9月30日
当記事の方法をさらに改良した方法については、次の記事で解説しています。