Announcing our new Paper: The Prompt Report, with Co-authors from OpenAI & Microsoft!

Check it out →
🖼️ 圖像提示詞🟢 介紹

🟢 介紹

最後更新於August 7, 2024,作者:桑德舒爾霍夫

如何找到最佳的提示詞來生成完美的圖片是一項特殊的挑戰。與文字提示相比,研究如何做到這一點的方法並沒有那麼成熟。這可能是因為建立物件自身的挑戰,這些物件基本上是主觀的並且往往缺乏良好的準確性度量方法。但不要擔心,社群1已經對如何提示各種影象模型23有了很大的進展。

本指南涵蓋了基本的影象提示技術,並且我們強烈建議您檢視本章末尾的優秀資源。此外,我們還提供了一個端到端影象提示過程的示例。

例子

這裡,我將透過一個例子說明我是如何為這門課程的封面建立圖片的。之前我一直在進行一個深度強化學習神經輻射場專案,使用了低多邊形模型,我很喜歡這種低多邊形的風格,並且想在這個課程的封面圖片中使用它。

我想要在封面圖片上展示一個宇航員、一枚火箭和一臺電腦。

我對如何建立低多邊形圖片進行了大量研究,包括在 r/StableDiffusion 和其他網站上查詢,但沒有找到非常有用的資訊。

於是我決定從 DALLE 和提示語 Low poly white and blue rocket shooting to the moon in front of a sparse green meadow 開始嘗試,看看會發生什麼。

我認為這些結果對於第一次嘗試來說是非常不錯的,我特別喜歡左下角的火箭。

接下來,我想要生成同樣風格的一臺電腦: Low poly white and blue computer sitting in a sparse green meadow

最後,我想要一個宇航員!Low poly white and blue astronaut sitting in a sparse green meadow with low poly mountains in the background 看起來很奏效。

我認為第二張圖還不錯。

現在我有了一個宇航員、一個火箭和一個電腦。我對它們很滿意,所以我把它們放在了主頁上。幾天後,經過我的朋友們的反饋,我意識到這些圖片的風格不夠一致 😔。

我在 r/StableDiffusion 上做了更多的研究,發現人們在使用 “isometric” 這個詞。我決定嘗試一下這種風格,使用 Stable Diffusion 而不是 DALLE。我還意識到需要在我的提示語中增加更多的修飾語來約束風格。於是我嘗試了這個提示語: A low poly world, with an astronaut in white suit and blue visor sitting in a sparse green meadow with low poly mountains in the background. Highly detailed, isometric, 4K

這些結果不是很好,所以我決定先從「火箭」入手

A low poly world, with a white and blue rocket blasting off from a sparse green meadow with low poly mountains in the background. Highly detailed, isometric, 4K

這些結果並不是特別好,但在進行了一些嘗試之後,我最終得到了下面的影象

現在我想要一個更好的膝上型電腦

A low poly world, with a white and blue laptop sitting in sparse green meadow with low poly mountains in the background. The screen is completely blue. Highly detailed, isometric, 4K

我得到的結果不太一致;雖然我喜歡右下角的那個影象,但我決定走另外一條路線。

A low poly world, with a glowing white and blue gemstone sitting in a sparse green meadow with low poly mountains in the background. Highly detailed, isometric, 4K

這不是很對,讓我們嘗試一下魔幻的發光效果。

A low poly world, with a glowing white and blue gemstone magically floating in the middle of the screen above a sparse green meadow with low poly mountains in the background. Highly detailed, isometric, 4K

我喜歡這些影象,但是希望石頭在螢幕的中間。

A low poly world, with a glowing blue gemstone magically floating in the middle of the screen above a sparse green meadow with low poly mountains in the background. Highly detailed, isometric, 4K

在這個階段,我使用了 Stable Diffusion,讓之前的圖片對後續的圖片產生一些影響。於是我得到了以下結果:

最終,我得到了這個。

A low poly world, with an astronaut in white suite and blue visor is sitting in a sparse green meadow with low poly mountains in the background. Highly detailed, isometric, 4K

在這一點上,我對我的三張圖片之間的風格一致性感到滿意,可以在網站上使用它們了。對我來說,主要的收穫是這是一個非常反覆、不斷研究的過程,我必須根據不同的提示和模型進行實驗,調整我的期望和想法。

Footnotes

  1. Parsons, G. (2022). The DALLE 2 Prompt Book. https://dallery.gallery/the-dalle-2-prompt-book/

  2. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., & Ommer, B. (2021). High-Resolution Image Synthesis with Latent Diffusion Models.

  3. Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., & Chen, M. (2022). Hierarchical Text-Conditional Image Generation with CLIP Latents.

Word count: 0

Get AI Certified by Learn Prompting


Copyright © 2024 Learn Prompting.