😀

stable-diffusion-webui に拡張機能となったaesthetic gradientsを導入してみる

2022/11/05に公開

NovelAIでしばらく揉めていた下記のリポジトリの環境整備を進める
https://github.com/AUTOMATIC1111/stable-diffusion-webui

Stable Diffusionのみならず少し前にNovelAI周りで色々な理由で話題となったリポジトリである。
Diffusionモデルの実行環境として主要なWebUIであるように思う。
Aesthetic Gradients の機能とImage Browserがwebuiの拡張機能となって以前と少し異なるextension導入手順が追記されているので
Webuiへの導入手順をまとめておく

▼実行環境
Ubuntu 20.04
Nvidia Geforce RTX3090

1 リポジトリをcloneする

前提条件としてUbuntuで適当なgit用リポジトリを作成してリポジトリはcloneされているものとする。

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui

extensions/aesthetic-gradients を指定して拡張機能をインストールする

$ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients extensions/aesthetic-gradients
Cloning into 'extensions/aesthetic-gradients'...
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 21 (delta 3), reused 18 (delta 3), pack-reused 0
Unpacking objects: 100% (21/21), 1.09 MiB | 1.98 MiB/s, done.

2 早速WebUIを実行してみましょう

$ cd stable-diffusion-webui
$ bash webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on keigo user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.9.12 (main, Apr  5 2022, 06:56:58) 
[GCC 7.5.0]
Commit hash: 30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e
Installing requirements for Web UI
Launching Web UI with arguments: --deepdanbooru
Loading config from: /home/keigo/git/stable-diffusion-webui/models/Stable-diffusion/final-pruned.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 64, 64) = 16384 dimensions.
making attention of type 'vanilla' with 512 in_channels
Using VAE found beside selected model
Loading weights [1d4a34af] from /home/keigo/git/stable-diffusion-webui/models/Stable-diffusion/final-pruned.ckpt
Loading VAE weights from: /home/keigo/git/stable-diffusion-webui/models/Stable-diffusion/final-pruned.vae.pt
Applying cross attention optimization (Doggettx).
Model loaded.
Loaded a total of 0 textual inversion embeddings.
Embeddings: 
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

3 ローカル環境で提供されるサービスのURLにアクセスし拡張機能をインストール http://127.0.0.1:7860

ここでextensions->Availableのタブへ移動するとインストール出来る拡張機能があるので
試しにaesthetic gradient の拡張機能をインストールしてみた

WebUIを再起動してみるとどうやらAesthetic Gradientsの項目がちゃんと見れている模様

Thanks

thanks to everyone behind these awesome projects,
First I would like to contribute the project by introducing best environment run with the user PC environment.
And I will contribute the democratized AI through this activity.

AUTOMATIC1111/stable-diffusion-webui

GitHubで編集を提案

Discussion