投稿

8月, 2022の投稿を表示しています

Stable Diffusion試してみた

イメージ
話題のオープンソースAI画像生成ソフト Stable Diffusion を試してみました。 といっても,我が家の最速PCのグラフィックボードはRTX 2060 SUPER VRAM 8GBということで,Stable Diffusionを素直に動かすVRAM 10GB以上という条件を満たさないのです。 というわけで, https://huggingface.co/blog/stable_diffusion  の下の方のNoteに書かれている下記の方法で,fp16 precisionで動作させることにしました。(これなら,8GB環境でも動く) Note: If you are limited by GPU memory and have less than 10GB of GPU RAM available, please make sure to load the StableDiffusionPipeline in float16 precision instead of the default float32 precision as done above. You can do so by loading the weights from the fp16 branch and by telling diffusers to expect the weights to be in float16 precision: ちなみに,このdiffusersを使う方法は,多少自分でPythonプログラムを書いてやる必要があります。 で,絵を描くには,Stable Diffusionさんにこういうテーマで描いてほしいという指示を与えてやらないといけないのですが,やはり得手不得手があるようです。 ちなみに,上の画像は "fairy dreamy and misty swamps in Asgard forest" ということで,「幻想的な(北欧神話の)アースガルドっぽい森」という感じです。こういう,ふわっとした幻想的な感じの絵は,割とうまく行くようです。(うまく行くというのは,あくまでも主観) elfen village in the dreamy and misty and snowy forest in winter elfen hut in th