Stable DiffusionTips2 †

更新日2023-09-04 (月) 07:29:28
作成日:2023年8月16日
↑

日本語化 †

日本語化.png

日本語化2.png

日本語化3.png

日本語化4.png

↑

Beautiful Realistic Asiansモデルの追加 †

BRA5,BRA6を以下からDownload

↑

BRA5 †

↑

BRA6 †

ZIPを解凍して「models\Stable-diffusion\」に入れて再読み込み。

↑

ControlnetのInstall †

Controlnet1.png

Controlnet2.png

Controlnet3.png

Controlnet4.png

↑

参考 †

https://koneko3.com/how-to-use-controlnet/

↑

DynamicPromptのインストール †

「Dynamic Prompt」はプロンプトの中に{|}を使うことで、1つの呪文(プロンプト)を何パターンかに分けて、それぞれを画像生成する

DynamicPromptInst1.png

DynamicPromptInst2.png

DynamicPromptInst3.png

DynamicPromptInst4.png

↑

「Stable Diffusion web UI」のアップデート方法 †

↑

参考 †

↑

Controlnet モデル インストール †

Controlnetをインストールしただけだとモデルが入っていないので、Downloadしてインストールする
14種類をDownloadする

↑

ダウウンロード †

以下のURLにアクセス

「controlnet」を検索する

model_inst1.png

以下のURLにジャンプする

https://huggingface.co/lllyasviel/ControlNet-v1-1

model_inst2.png

model_inst3.png

↑

DLしたファイルをコピーする †

model_inst4.png

↑

動作確認 †

txt2imgでControlnetに適当な画像(プロンプトの内容に合うような画像)をドラッグ&ドロップして以下のようにしてみた

a businesswoman in the midst of a sales pitch, earnestly engaging and persuading her audience.

↑

作成サンプル †

cn_sample.png

↑

メモリ不足対応 †

以下のエラー対応

RuntimeError: Not enough memory, use lower resolution (max approx. 512x512).
' Edit by JE2ISM
'set COMMANDLINE_ARGS=
set COMMANDLINE_ARGS=--medvram
↑

参考 †

↑

Error †

A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

webui-user.batに以下を追加

set COMMANDLINE_ARGS=--no-half

' Edit by JE2ISM
'set COMMANDLINE_ARGS=
set COMMANDLINE_ARGS=--medvram --no-half

今回は不要のようだが以下の変更も有効のようだ

Error1.png

↑

メモリ不足対応2 †

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 36.00 MiB (GPU 0; 4.00 GiB total capacity; 17.73 GiB already allocated; 0 bytes free; 17.84 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

@echo off

'Edit by JE2ISM
set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6, max_split_size_mb:128 ←ここ

if not defined PYTHON (set PYTHON=python)
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS