見出し画像

AI (Stable Diffusion) で画像生成しようしたけど、エラーが出て、エラー取ろうとしたけど、エラーが取れないって話

前置き:

下記の参考サイトを参考に、Stable Diffusion が置いてあるサイトとモデルが置いてあるサイトから Stable Diffusion と使用するモデルをインストールしておきます。

参考サイト:


 画像生成AI「Stable Diffusion」の使い方をていねいに解説 | 株式会社LIG(リグ)|DX支援・システム開発・Web制作 (liginc.co.jp)

Stable Diffusion があるサイト:



 GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI

モデルがあるサイト:


 Civitai Models | Discover Free Stable Diffusion Models

実際に画像を生成してみる:

 モデルをダウンロードし、プロンプトを入力して、画像を生成します。

今回使ったモデル:


 TMND-Mix - TMND-Mix_VII_BakedVAE | Stable Diffusion Checkpoint | Civitai

※ 下記のプロンプトは、上記リンクにはもう無いので、コピペしてください。

今回使ったプロンプト:

プロンプト:

A melancholic autumn scene in a vast flower field,a gentle breeze rustling through the dry grass,fallen leaves scattered among the flowers, a bittersweet atmosphere, a moment of quiet contemplation,1girl,long hair,white_skirt, high-waist_shorts, outfit ,roses,(dynamic angle:1.1),vivid,Soft and warm color palette, delicate brushwork, evocative use of light and shadow, wide shot,subtle details in the wilting flowers,high contrast,color contrast,

ネガティブプロンプト:


badhandv4, EasyNegative, verybadimagenegative_v1.3, (worst quality:2), (low quality:2), (normal quality:2)

下記画像のように、プロンプトとネガティブプロンプトを入力して画像を生成しますが、エラーが表示されます。

図1.  エラーが出てるStable Diffusion の画面

エラーの意味が分からんから、Microsoft Edge の Bing に聞いてみる:

エラー内容:


 OutOfMemoryError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 6.00 GiB total capacity; 4.21 GiB already allocated; 0 bytes free; 4.44 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Time taken: 12.6 sec.

A: 4.32 GB, R: 4.44 GB, Sys: 6.0/6 GB (100.0%)

下記画像のように、エラー内容を投げてみる。

図2. Microsoft Bingの画面

結論:

Microsoft Bing にエラー内容を投げて、回答を読んだけど、時間切れで理解できず、エラー取れず。来週、エラー取れればいいけど…。

この記事が気に入ったらサポートをしてみませんか?