Beerhouse³ 営業日誌

ものづくりの街、新潟県三条市でビール屋やってます

ダルえもん、青いネコ型ロボット出して

 

どうも。新潟県三条市の中心部、「本寺小路」でクラフトビールを中心とした飲食店「Beerhouse³」を、とりあえず何とか営業しております店主いけのです。

 

ビールも飲食店経営も全然関係ない話だけど、ついに、ChatGPT有料版に画像生成AIの最新版、Dall-E3が来たぞ!

 

という訳で、色々と遊んでみたので備忘録的に。

 

 

Dall-E3とは

Dall-Eは、ChatGPTで有名なOpenAIが開発してる画像生成AI。

以前から言葉を入れると画像を生成するAIはいくつか発表されてたのだけど、2022年夏にOpen AIからDall-E2が出て、その精細さにネットがにわかに沸き立った…のも束の間、続いて、midjourney(ミッドジャーニー)や、Stable Diffusion(ステイブル・ディフュージョン)が発表されて、みるみる印象が薄くなっていたOpenAIが、2022年の終わりに、対話型のChatGPT3、マイクロソフトのBingとの提携、そして年明けには有料版のGPT4を出して再び話題を集めた、というのが、ここ1年の流れ。

 

そして、今回、他の画像生成AIに対して後塵を拝していた感がある、Dall-Eが「3」にアップデートされて、しかもChatGPT有料会員に、GPT4との組み合わせで提供開始、という展開。

 

他の画像生成AIと比べると現状では、ChatGPTと組み合わせているので、精緻なプロンプト(呪文、命令)を考えなくても、何となくこんな感じ、と指示を出すと、ChatGPTがプロンプトを適当に考えて生成してくれる、というのが最大の強みでしょうかね。

 

ちなみにこの記事のタイトルは「ダルエ」にしたけど、実際にはカナ書きだと多分「ダルイー」…だけど、日本人以外は「dalu」みたいに「u」は入らなくて、サルバドール・ダリと掛けてるんだと思います。

 

 

では、前置きはこのくらいで実際に見てみましょう。

 

 

青いネコ型ロボット

ダルえもん、青いネコ型ロボット出して―。色は青と白で、赤い首輪のやつ。

 

…おっと、ChatGPT、実際のやりとりは英語でやっています*1

 

"An upright bipedal robot with a cat motif. The body color is blue and white with red collar."

 

 

 

※クリックで画像は拡大できます。

 

青いネコ型ロボットの注文に4枚の画像が返されますが、それぞれ、そのままプロンプトとして生成するのではなく、ChatGPT+Dall-E3が独自に読み替えて、画風なども決めてプロンプトを生成します。ChatGPTが考えたプロンプトは順に、

 

左上:Photo of an upright bipedal robot designed with a cat motif. The robot's body is predominantly blue and white, and it has a distinct red collar around its neck. Its eyes resemble those of a cat, with sleek, metallic whiskers protruding from the sides of its face.

右上:Illustration of a futuristic robot standing upright on two legs. The design is heavily inspired by a cat, with blue and white metallic surfaces. A red collar stands out around its neck, and its eyes glow with feline intensity.

左下:Render of a bipedal robot in a standing position. The design is a blend of modern robotics and feline aesthetics. Its body is a mix of blue and white, with a bright red collar as a striking feature. The robot's face has features reminiscent of a cat, including metallic whiskers.

右下:Vector art of a unique robot with two legs, standing tall. The robot's design is influenced by a cat, having a blue and white color scheme. A contrasting red collar circles its neck. The robot's eyes and facial features give it a cat-like appearance.

 

直立二足歩行と言ってるのに4つ足のが出ましたが(プロンプトでも2つの足で立つと明示しているのに)、右上のロボの雰囲気が気に入ったので、これをベースに改善を求めます。

 

 

修正

2番目のやつを写真風にして、できれば立たせて。あと画像の縦横比は縦長*2でお願いね。

 

"Second image in 8K photo style. Try to draw a standing image if you can. The aspect ratio should be vertical."

 

 

8K photo of a futuristic robot standing upright on two legs in a vertical frame. The robot's design is heavily inspired by a cat, with blue and white metallic surfaces. A prominent red collar stands out around its neck, and its eyes emit a feline glow. The robot's posture is tall and commanding, showcasing its full stature.

 

直立してくれました! カッコイイ! ポケットから道具を出すよりも、威張ってるガキを直接、殴りに行ってくれそう! まあ、もうちょい全身が青多めでもいいと思いますけど。

 

 

なお、挙動として、わりと長い文章で画像生成を依頼しても、50語250字程度のプロンプトに圧縮して生成するのですが、今回のように生成された画像をもとに修正依頼を出した場合には、もう少し長めのプロンプトで生成します。

 

また、修正の場合は今回のように1枚だけ出してくるときと、4枚出すときがあって、この辺りの挙動は不明です。

 

 

巨大ロボ

さらに追加で、青の面積を増やし、顔・腹・手足だけを白くするよう何度か依頼を試みましたが、あんまりしっくり来るものは出してくれず…。

 

方針変更して人間が搭乗可能なサイズに巨大化を試みます。

 

"Let's make this cat robot huge. It is a giant robot that a human rides on, not like the ones in Japanese robot anime, but  more realistic and practical shape. It is blue with white accent and a red collar representing cats. 8k photo, cat robot standing on a street in Tokyo."

 

 

8K photo capturing the moment when a massive cat-themed robot, painted in blue with white accents, stands mightily amidst Tokyo's urban landscape. The robot's realistic and utilitarian design sets it apart from fantastical anime robots. A red collar encircles its neck, emphasizing its cat inspiration. Below, people on the streets look up, taking photos and marveling at the sight, while a human rider confidently controls the robot from above.

 

また四つ足に戻ってしまいました。しかもちょっとコミカル。むしろ配色などの雰囲気が某ネコ型ロボットに近づいた印象。

 

正確に言うと実は、直立画像も含めて、今回は4枚出してくれたのですが、青と白と赤(と黄)という配色指示がよくないのか、某・連邦軍のRXがつく巨大ロボにしか見えないヤツばかり(ネコ要素ゼロのも含め)出してきたので、割愛してます。

 

もっと正確に言うと、この画像は指示を微妙に変えて、3回(×4で12枚)出したうちの3回めの1枚です。12枚のうち8枚が完全にアレ、2枚が何となくアレ、2枚がこれを含め切り離し成功、という感じです。

 

ちなみに修正は、今回は生成された画像に対して都度、修正指示を繰り返していくのではなく、上の直立ロボのスレッドのすぐ下への指示自体を書き換えました。

 

ChatGPTはスレッドを続けていくと、前後の文脈を読み取って、書いてないことも類推する、という特徴がありますが、画像生成後に追加で修正するのではなく、生成前に遡って書き換えた場合でも、前の質問がなかったことにはならず、内容が内部メモリに残っていて、それを引きずってしまうような印象があります。実際のところは不明ですが。

 

今回は最初に「日本のアニメに出てくるような巨大ロボ」と言ったのですが、それを取り消しても消えずに引きずっている印象です。なので、「日本のアニメ」から連想して、連邦のヤツや、この赤い首輪に黄色い鈴、腹と手足が白い青いロボットを出している疑惑…。ちなみに著作権への配慮は一応なされていて、「ガ〇ダム」と直接指示した場合は逆に出さないらしいです。

 

 

実戦的造形への方針変更

日本のアニメっぽい雰囲気にどうも引きずられてしまう。狙っている巨大ロボを出すには、最初にリアルな乗り物から始めて、それを修正してロボットに改造した方がいいのでは?

 

ということで、いったん新しいスレッドを立て直して、まずはポスト・アポカリプス世界*3の戦車を生成させます。

 

"A heavy tank with a cat motif used by the imperial army in the post-apocalyptic world stands in the desert. In horizontal aspect."

 

 

 

左上:Photo of a heavy tank adorned with cat motifs, used by the imperial army, parked in the vast desert. The tank's design reflects a post-apocalyptic aesthetic with rusted metal, spikes, and armored plates. The desert stretches out endlessly, with dunes and a clear sky.

右上:Illustration of a massive tank with intricate cat designs and symbols. The tank, belonging to the imperial forces, sits in a post-apocalyptic desert with scattered debris and remnants of a past civilization. The sun casts long shadows on the sand.

左下:Render of a formidable tank with cat-inspired decorations, representing the might of the imperial army in a devastated world. The tank stands in a barren desert, where the remnants of war can be seen. The sky overhead is a fiery orange, hinting at a recent catastrophe.

右下:Photo of a powerful tank, bearing cat emblems and graffiti, signifying its allegiance to the imperial army in a world after an apocalypse. The desert landscape shows signs of past battles, with craters and burnt marks. A few scavenger birds fly in the distant sky.

 

うーむ、もうちょっとプジョーにおけるライオン・モチーフや、トランスフォーマーゾイドのようなネコ型戦車を期待したんだけども、ネコ要素…。

 

まあ、世界観というか雰囲気はよさそうなので(前述のとおり前の会話の内容は引きずるので)、どれかを改変するのではなく、ここに続けて新しいプロンプトで巨大ロボを作ります。

 

"A human-crewed, upright, bipedal heavy robot with a cat motif used by the Imperial Army in the post-apocalypse world stands in the desert. In vertical aspect."

 

   

 

1枚目:Illustration of a towering bipedal robot with cat motifs, operated by a human crew from inside. This mechanized titan belongs to the Imperial Army and stands proudly in a post-apocalyptic desert, with sand dunes and a bleak sky overhead. The robot's design incorporates armored plates, rusted details, and advanced weaponry.

2枚目:Photo of a large, upright, human-controlled robot, adorned with cat-inspired designs and symbols, representing the might of the Imperial Army. The robot stands firm in a desolate desert landscape, with remnants of a devastated civilization scattered around. The sunset casts a golden hue on the scene.

3枚目:Render of a massive, two-legged robot with intricate cat decorations, symbolizing its allegiance to the Imperial Army in a world after cataclysm. The desert stretches endlessly, bearing witness to the scars of war and time. The robot's imposing stature is accentuated by the vastness of the surroundings.

4枚目:Drawing of a formidable bipedal mech with cat emblems, piloted by humans from within its cockpit. This war machine of the Imperial Army stands in a barren desert, with distant ruins hinting at a once-thriving civilization. Sandstorms loom on the horizon, adding to the atmospheric tension.

 

1枚目、どの辺がネコ要素なのかよく分からんけど(コクピット周辺?)、雰囲気はいいので、これに腕とネコ感を足させます。

 

"The atmosphere of the first one is nice, but try adding a cat-like head and arms."

 

 

Illustration of a towering bipedal robot with a distinctly cat-like head and arms, operated by a human crew from inside. This mechanized titan, adorned with cat motifs, belongs to the Imperial Army. It stands in a post-apocalyptic desert with sand dunes and a bleak sky overhead. The robot's design showcases armored plates, rusted details, and advanced weaponry.

 

おお、コクピットがちょっとネコっぽくなったけど、もっと! そして腕! 「arms」が「腕」と「武器」を混同している…?

 

"The head should be more mechanised cat shape while the arms and legs should be closer to a human-like."

 

 

Illustration of a towering bipedal robot, featuring a mechanized cat-shaped head and human-like arms and legs. The robot, operated by a human crew from inside, stands in a post-apocalyptic desert surrounded by sand dunes. The design combines the ruggedness of armored plates and rusted details with the finesse of its cat-inspired head.

 

下が途切れてるけど、いんじゃないの?! ちなみに、これを出す前に1回「もっとネコっぽく」と言ったら、四つ足かつメカニカルじゃないネコを出してきたので、遡って前述のような指示に修正しています。

 

そういえば、青くしてなかった。砂漠用だからこれはこれで雰囲気あるけど。

 

"Then paint the entire robot surface in blue, and standing in the ruined city streets."

 

 

Illustration of a towering bipedal robot, painted entirely in blue, with a mechanized cat-shaped head and human-like arms and legs. The robot stands amidst the ruined city streets, with remnants of buildings, broken roads, and overturned vehicles. Its design, while sleek with its blue paint, contrasts starkly with the desolation around.

 

ううむ、これはこれで悪くないけど、さっきのマッシヴな戦闘用マシン感がなくなってしまった…。戻って、色の指示を少し変えてみるか。

 

"this robot is originally painted blue, the paint has peeled off in time and the white undercoat is beginning to show."

 

 

Illustration of the towering bipedal robot, now with a blue exterior paint that has weathered over time, revealing patches of its white undercoat. The robot, with its mechanized cat-shaped head and human-like arms and legs, stands in a post-apocalyptic desert. The signs of age and wear on its paint give it a sense of history and battles endured.

 

質感は戻ったけど、ネコ感どこ行った? 再び戻って、ネコ感を強調して色合いを調整。

 

"this cat motif robot is originally painted blue, the paint has peeled off in time and the white undercoat is beginning to show."

 

   

 

1枚目:Illustration of a towering bipedal robot with a mechanized cat-shaped head and human-like arms and legs. The robot's original blue paint has weathered over time, revealing the white undercoat beneath. Amidst the post-apocalyptic desert, this aging guardian of the Imperial Army showcases the scars of countless battles, with its chipped paint and rusted details.

2枚目:Drawing of the mechanized cat-head robot, once painted in a vibrant blue, now showing signs of wear and tear. The blue paint has chipped and faded in places, exposing the white undercoat. It stands resiliently in the desert, a testament to the ravages of time and war.

3枚目:Render of the bipedal robot, characterized by its intricate cat head and humanoid limbs. The once-blue paint has peeled off in patches, revealing the white primer underneath. This war-worn machine of the Imperial Army stands amidst the vast desert, embodying the passage of time in a post-apocalyptic world.

4枚目:Illustration of the grand cat motif robot, its blue paint worn and chipped, revealing the underlying white coat. Despite the wear, its stature remains unyielding in the desolate desert. The sun casts shadows that accentuate its battle scars and the ravages of time.

 

なぜか4枚出てきた。1枚目はさっきと大差ない感じ。2枚目、顔だけになってしまったけど、わりといい? 3枚目も二足歩行にして重量感を加えればよさそうだけど…。

 

 

という訳で、ある程度、方向性を決めて修正を加えていくのが良さそうではあるものの、色を途中で変えたりすると、変更のたびに徐々に重要ポイントのプロンプトが省略されて当初の良さが失われてしまうので、重要ポイントは最初から入れ込んでおいて、足りない要素を強調して修正を加えていくのが良さそうです。

 

 

まとめと課題

というわけで、ChatGPT+Dall-e3で青いネコ型ロボットを生成して遊んでみました。

この記事を書いてる間に見かけた記事として、こちらの記事では、Stable Diffusionとの比較などでをしており、面白かったです。

 

ascii.jp

 

この記事で紹介されている、Dall-e3が生成した画像の構図を引用して、Stable Diffusionでさらに生成させる、という手法は興味深いところです。

 

現状、Dall-e3では画像から別の画像を生成させる、i2i (image to image)が使えないので。

 

もちろん画像認識機能のChatGPT4-Vを使えば、特定の画像を読み込ませて、その特徴を抽出することはできるのですが、じゃあ、その内容にそのまま、あるいは適宜、修正を加えて画像生成に使えるか、というと、前述のとおり、長文を入力しても50語程度に自動的に要約してプロンプトを生成するんですよね。

 

そして、バリエーションをいくつか試す場合には、適当な言い換えも入るのですが、このとき、こちらが言ってない内容を入れることもあります。

 

この要素だけは絶対に入れてほしい、という強調したい要素を「重みづけ(weight)」することは出来るか、についてはDall-e3先生本人に聞いたところ、直接指定する方法も今のところない、とのことでした。なるべく、その要素を繰り返し、精緻に言及することで、強調することはできる、とのことです。

 

また、長さについても絶対に入れたい要素があるので長めのプロンプトで、と文中で指示すれば長くすることは可能、と先生は言っています。確認はしていませんが。

 

 

この1年間の生成AIの進歩を見ると、この辺りは、おそらく技術的には容易に実現可能な話で、むしろ、各種の人権侵害や知的財産権侵害等の課題への対応のため、今のところは抑制的に実装しているのかな、という印象です。

先生本人もプロンプト修正の方針として、破綻しないようにすることと並んで、ポリシーに沿ったものになるよう配慮している、と言っています。

 

 

今のところ、自動的にプロンプトを改変することのメリットとして、バリエーションが生まれやすくなる一方、同じことの裏返しのデメリットとして、たとえば同じキャラクターの別ポーズや別シーンを一貫性をもって生成することができません。

つまり、マンガなんかのキャラクターづくりは難しそうです。

先生本人も、いくつか戦略はあるが一貫性を保つことは難しい、と認めています*4

 

その点、現時点での用途としては、今までストック素材を使っていた1枚物の挿絵の代替や、クリエイティヴ・チーム内で雰囲気を共有するためのイメージ・コラージュみたいな使い方が現実的なのかと思う次第です。

 

どんな使い方ができるか、もうちょっとアレコレ試してみたいところ。とりあえず、うちではヘッダとリンク時のサムネイルにストック素材を使っていたので、そこは順次、置き換えていけそうかなと考えています。

 

 

 

 

 

*1:日本語処理能力も高いですが、英語の方が速いし、一度に処理できる情報量(トークン数)でも英語の方が効率いいし、記憶している情報量も多く、また英語の方が修飾語の掛かり方みたいな論理的整合性も取りやすいので。自分のやり方は英語で文章をアタマで考えつつ、その和訳(つまり英訳しやすそうな日本語)を、DeepLに投げて日英翻訳、英語の文意が意図通りになっているか確認して(何なら英日翻訳を再度かけて)、ChatGPTにコピペです

*2:縦横比はデフォルトで1024x1024の正方形ですが、横長の1792x1024と縦長の1024x1792が出力可能です(とDall-E3は言っています)

*3:大戦争で文明が荒廃して中世に戻ってしまったけど一部の科学技術は現代よりも発達したまま維持されている世界

*4:長文記録を保持できるので、人物名を付ける、ストーリーを最初に用意する等の戦略は提案してくれましたが実効性は確認していません