This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""SAMPLING ONLY.""" | |
""" | |
ファイル名: ddim.py | |
概要: | |
このファイルは以下のTDSさんのnoteを参考に、コード内容を修正したddim.pyとなります。 | |
https://note.com/tds_/n/n5aad9ef8a9b1 | |
上のnoteに記載されている new_schedule.json がStable Diffusion web UIのルート配下に配置されていないと正常に動きません。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@title Stable Diffusion web UI(最新版)をGoogle Colabで起動するためのコマンド | |
#@markdown ## このColabノートブックについて | |
#@markdown [Stable Diffusion web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) をGoogle Colabで起動するためのノートブックとなります。 | |
#@markdown 利用したいモデルや拡張機能、LoRAなどにチェックを入れた上で実行ボタンを押すことで、設定した内容でStable Diffusion web UIが起動します。 | |
#@markdown また各項目には公式ページへのリンクをつけています。利用の際は公式ページよりライセンスなどを確認した上でご利用ください。 | |
### Stable Diffusion web UIインストール |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Stable Diffusion web UI v.1.5系を起動するためのコマンド ### | |
# ランタイムの設定: T4・ハイメモリ以上を推奨 | |
# | |
# 利用モデル: | |
# SDXL base 1.0 | |
# DreamShaper XL 0.9 Alpha(コメントアウトした状態になっているので、利用する際はコメントを外してください) | |
# | |
# 利用する拡張機能: After Detailer | |
# stable diffusion webuiのリポジトリをクローンして、クローンしたフォルダに移動 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### AnimateDiffを利用するための環境構築コマンド ### | |
# stable diffusion webuiのリポジトリをクローンして、クローンしたフォルダに移動 | |
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
%cd /content/stable-diffusion-webui | |
# ライブラリのバージョンでエラーになるため以下を実施 | |
!pip install torch==2.0.0+cu118 torchdata==0.6.0 torchtext==0.15.1 torchvision==0.15.1+cu118 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 | |
# v1.5.1を利用する | |
!git checkout tags/v1.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 使い方 ### | |
# Google Colab上で空のコードブロックを一つ追加し、こちらのコードを挿入して実行すれば、生成画像のダウンロード処理が開始されます | |
# 実行する際はStable Diffusion web UIの実行は停止した上で行う必要があります | |
############# | |
# ZIP化 | |
!zip -r /content/file.zip /content/stable-diffusion-webui/outputs/ | |
# ダウンロード | |
from google.colab import files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stable diffusion webuiのリポジトリをクローンして、クローンしたフォルダに移動 | |
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
%cd /content/stable-diffusion-webui | |
# ライブラリのバージョンでエラーになるため以下を実施 | |
!pip install torch==2.0.0+cu118 torchdata==0.6.0 torchtext==0.15.1 torchvision==0.15.1+cu118 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 | |
# v1.4.1を利用する | |
!git checkout tags/v1.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 方法1 ### | |
# 拡張機能の名称については https://~~~/foobar.git とURLがあった場合、 foobar のことを指します | |
!git clone {ここにダウンロードしたい拡張機能のURLを入力してください} /content/stable-diffusion-webui/extensions/{拡張機能の名称} | |
# 例:例えば拡張機能であるRembgをStable Diffusion web UIに導入するためのコマンドは以下となります | |
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg.git /content/stable-diffusion-webui/extensions/stable-diffusion-webui-rembg | |
### 方法2 ### | |
%cd /content/stable-diffusion-webui/extensions | |
!git clone {ここにダウンロードしたい拡張機能のURLを入力してください} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### BracingEvoMix(3モデル)環境構築コマンド ### | |
# stable diffusion webuiのリポジトリをクローンして、クローンしたフォルダに移動 | |
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
%cd /content/stable-diffusion-webui | |
# ライブラリのバージョンでエラーになるため以下を実施 | |
!pip install torch==2.0.0+cu118 torchdata==0.6.0 torchtext==0.15.1 torchvision==0.15.1+cu118 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 | |
# v1.3.2を利用する | |
!git checkout tags/v1.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stable diffusion webuiのリポジトリをクローンして、クローンしたフォルダに移動 | |
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
%cd /content/stable-diffusion-webui | |
# ライブラリのバージョンでエラーになるため以下を実施 | |
!pip install torch==2.0.0+cu118 torchdata==0.6.0 torchtext==0.15.1 torchvision==0.15.1+cu118 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 | |
# v1.5.1を利用する | |
!git checkout tags/v1.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stable diffusion webuiのリポジトリをクローンして、クローンしたフォルダに移動 | |
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
%cd /content/stable-diffusion-webui | |
# ライブラリのバージョンでエラーになるため以下を実施 | |
!pip install torch==2.0.0+cu118 torchdata==0.6.0 torchtext==0.15.1 torchvision==0.15.1+cu118 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 | |
# v1.3.2を利用する | |
!git checkout tags/v1.3.2 |