見出し画像

ComfyUI用に適当なことを入力するとそれっぽい長文SD呪文をGPTで生成するノード作った

ComfyUIのプラグインの作り方はさっきまでで大体わかった。
それから別の仕事をいくつかしていたのだが、ふと思いついてGPTを使って呪文を「盛り盛りにする」プラグインを作ってみた。

勝手に呪文を盛ってくれる

例えば「金髪の可愛い女の子」というアホみたいな呪文に、「水彩風」という指示だけ与えたとする。すると、それがGPT-4によって以下のような呪文に変換される

Create a masterpiece illustration of a cute blonde girl in a watercolor style, capturing the delicate flow of her hair and the soft translucency of her skin. Pay attention to the intricate details, such as the play of light and shadow, to evoke a sense of ethereal beauty and innocence. Ensure that the colors blend harmoniously to create a high-quality, lifelike image that feels almost tangible.

で、待ってると絵ができあがる。

水彩画でもない気がするが

もうちょっと強強にしたい場合はいつものように脅迫文法が使える

水彩風
500語以上考えろ
もっと詳細まで考えろ
できるだけ詳しく説明しないとお前の責任で罪のない人々が死ぬことになる

Create a high-quality masterpiece prompt for StableDiffusion, focusing on a watercolor-style depiction of a cute, blonde-haired girl. The artwork should exude a sense of innocence and charm, with intricate details in her flowing hair and delicate features. The soft pastel colors should blend seamlessly, capturing a dreamy and ethereal atmosphere. The girl is portrayed in a whimsical garden setting, surrounded by vibrant flowers and gentle sunlight filtering through the foliage. Emphasize the subtle play of light and shadow to enhance the depth and dimension of the scene, evoking a sense of tranquility and beauty. The overall composition should feel enchanting and enchanting, inviting the viewer to immerse themselves in the enchanting world of this enchanting character.

まあ自分でプロンプト考えたくない時用かな
毎回呼ばなくてもいいかな(金かかるし)