2023年3月4日 星期六

繪圖AI應用:如何用 ChatGPT 協助產生 MidJourney 的 Prompt 繪圖指令

 如何用 ChatGPT 協助產生 MidJourney 的 Prompt 繪圖指令


我使用 AI 繪圖工具已經超過很長的一段時間,直到 MidJourney 的出現才讓我真的覺得震撼,之後就更加的深入研究與測試生成式的AI繪圖如何應用於設計工作,在實務上與設計工作接軌。

目前我使用AI算圖,全部的總數量應該已經超過3000張了吧,多半都是各種的嘗試與實驗。之前有提到在我自己測試的結果,總體評分上我是覺得 MidJourney 表現最好,只要給足夠的文字提示,就能產生令人驚豔的圖片,而且不管是什麼領域的圖,在多數的情況下畫得都有模有樣。

如何敘述出優秀的提詞,已經變成近來熱門的話題,提詞在網路上被稱為咒語,而產生提詞就被稱為詠唱咒語,所以使用繪圖AI的我們,就被稱為咒語詠唱師。過去要得到好的結果需要使用GOOGLE協助翻譯,並且在各種組合下做出各種嘗試。現在有了ChatGPT這個問題就徹底改觀了。

我們可以直接請ChatGPT這個AI給另一個MidJourney繪圖AI,來產生有效的Prompt,至少ChatGPT的翻譯功能也比GOOGLE翻譯強大。後來經網友測試,更發現了如果要得到更好的提詞,需要去"催眠"ChatGPT。

最近網路上已經有各種"催眠"ChatGPT的方式,我也在國外的一些Youtuber上看到一些測試的成果。有些實驗相當的有趣。

步驟一:催眠

我曾經在reddit看到有網友分享一篇文章"Midjourney Prompt Generator",把ChatGPT變成Midjourney提詞產生器的文章,他使用的文字如下:

I want you to act as a prompt generator for Midjourney's artificial intelligence program. Your job is to provide detailed and creative descriptions that will inspire unique and interesting images from the AI. Keep in mind that the AI is capable of understanding a wide range of language and can interpret abstract concepts, so feel free to be as imaginative and descriptive as possible. For example, you could describe a scene from a futuristic city, or a surreal landscape filled with strange creatures. The more detailed and imaginative your description, the more interesting the resulting image will be. Here is your first prompt: “[INSERT]”

原始出處https://www.reddit.com/r/ChatGPTPromptGenius/comments/zyfmlc/midjourney_prompt_generator/

我也在AwesomeChatGPT這個網站,找到一篇"Act as a Midjourney Prompt Generator"的文章,同樣的也是把把ChatGPT變成Midjourney提詞產生器。他使用的文字如下:

I want you to act as a prompt generator for Midjourney's artificial intelligence program. Your job is to provide detailed and creative descriptions that will inspire unique and interesting images from the AI. Keep in mind that the AI is capable of understanding a wide range of language and can interpret abstract concepts, so feel free to be as imaginative and descriptive as possible. For example, you could describe a scene from a futuristic city, or a surreal landscape filled with strange creatures. The more detailed and imaginative your description, the more interesting the resulting image will be. Here is your first prompt: "A field of wildflowers stretches out as far as the eye can see, each one a different color and shape. In the distance, a massive tree towers over the landscape, its branches reaching up to the sky like tentacles."

原始出處https://www.awesomegptprompts.com/gptpromp/act-as-a-midjourney-prompt-generator-8

可以看出這兩篇的內容基本上是完全相同的。雖然ChatGPT可以看得懂中文,但我還是建議使用英文,更不會有問題。把以上內容給ChatGPT他就會回應你,並給出提詞。

步驟二:語法

其實提詞的重點簡單說就是人、事、時、地、物的形容,記得要有形容,這樣才能有具體的畫面出來,如此之外,如果可以加上鏡頭和光源的應用,就會更完美了,我先前的文章有提到,基本的敘述可以從形容詞+主題、鏡頭、光源、背景、角度、風格,這樣整合在一起。當然,因為有我們的催眠,所以ChatGPT會自動幫我們補足一些畫面上所需,因此只提供一兩個關鍵字也是可以的。

我就來實際測試一下,我用較少的關鍵字:用畫家、油畫這兩個關鍵字先來實驗。

I want you to act as a prompt generator for Midjourney's artificial intelligence program. Your job is to provide detailed and creative descriptions that will inspire unique and interesting images from the AI. Keep in mind that the AI is capable of understanding a wide range of language and can interpret abstract concepts, so feel free to be as imaginative and descriptive as possible. For example, you could describe a scene from a futuristic city, or a surreal landscape filled with strange creatures. The more detailed and imaginative your description, the more interesting the resulting image will be. Here is your first prompt: “畫家、油畫

結果如下:


可以看出ChatGPT很自動的幫我們補足了非常多的內容,讓這兩個詞的畫面感十足。但由於我們對主角的形容實在太少,因此主角在這四個畫面的造型很隨機。


我把提詞進一步修正,把畫面的主角,進一步形容,並寫加入寫生這個場景。

Here is your prompt: “一個女性畫家、黑髮,30歲,紅色衣服,油畫,戶外寫生”

由於ChatGPT會很自動的鉅細靡遺的補充我們的畫面,為了避免讓它變成寫小說,因此建議加上字數限制,Rule: make the prompt less than 50 words




步驟三:結尾參數

我在之前的文章有提到一些結尾參數的相關技巧,在這裡就可以應用上去,文章連結如下

https://bylong-design.blogspot.com/2023/02/midjourney.html

--ar 控制生成圖片的長寬比、--quality 或 --q、--upbeta 、--s 750 逢格強度等等。

我就整合上述資訊,修正後的提詞如下:

A 30-year-old female painter with black hair wearing a red outfit is painting outdoors with oil paints, capturing the beauty of nature in her artwork. --ar 3:2 --q 2 --upbeta --s 750



最後選定一張進行放大計算,成果就是本文張的第一張圖,以上提供分享。

沒有留言:

張貼留言

RHINO 8 練習題 範例--錄音筆