Update README.

This commit is contained in:
hodanov 2023-09-30 13:31:54 +09:00
parent 141c95049e
commit c05d019294
2 changed files with 25 additions and 11 deletions

View File

@ -12,7 +12,7 @@ This is a Diffusers-based script for running Stable Diffusion on [Modal](https:/
2. Upscaling
| Before upscaling | After upscaling |
| ---- | ---- |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| <img src="assets/20230708204347_1172778945_0_0.png" width="300"> | <img src="assets/20230708204347_1172778945_0_2.png" width="300"> |
## Requirements
@ -105,9 +105,7 @@ controlnets:
repo_id: lllyasviel/control_v11f1e_sd15_tile
```
Use a model configured for Diffusers, such as the one found in [this repository](https://huggingface.co/stabilityai/stable-diffusion-2-1).
Files in safetensor format shared by Civitai etc. need to be converted (you can do so with a script in the diffusers official repository).
Use a model configured for Diffusers, such as the one found in [this repository](https://huggingface.co/stabilityai/stable-diffusion-2-1). Files in safetensor format shared by Civitai etc. need to be converted (you can do so with a script in the diffusers official repository).
[https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py](https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py)
@ -119,6 +117,15 @@ python ./diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py --f
--device='cuda:0'
```
LoRA and Textual Inversion don't require any conversion and can directly use safetensors files. Add the download link to config.yml as below.
```
# Example
loras:
- name: lora_name.safetensors # Specify the LoRA file name. Any name is fine, but the extension `.safetensors` is required.
download_url: download_link_here # Specify the download link for the safetensor file.
```
### 4. Setting prompts
Set the prompt to Makefile.

View File

@ -11,7 +11,7 @@
2. アップスケーラーとControlNet Tileを利用した高解像度な画像を生成することができます。
| ベース画像 | アップスケール後 |
| ---- | ---- |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| <img src="assets/20230708204347_1172778945_0_0.png" width="300"> | <img src="assets/20230708204347_1172778945_0_2.png" width="300"> |
3. その他、LoRAとTextual inversionを利用できます。
@ -105,12 +105,19 @@ controlnets:
repo_id: lllyasviel/control_v11f1e_sd15_tile
```
ModelとVAEは[こちらのリポジトリ](https://huggingface.co/stabilityai/stable-diffusion-2-1)にあるような、Diffusersのために構成されたモデルを利用します。
Civitaiなどで共有されているsafetensors形式のファイルは変換が必要ですdiffusersの公式リポジトリにあるスクリプトで変換できます
ModelとVAEは[こちらのリポジトリ](https://huggingface.co/stabilityai/stable-diffusion-2-1)にあるような、Diffusersのために構成されたモデルを利用します。Civitaiなどで共有されているsafetensors形式のファイルは変換が必要ですdiffusersの公式リポジトリにあるスクリプトで変換できます
[変換スクリプト](https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py)
LoRAとTextual Inversionは変換不要で、safetensorsファイルをそのまま利用できます。
```
# 設定例
loras:
- name: mecha.safetensors # ファイル名を指定。任意の名前で良いが、拡張子`.safetensors`は必須。
download_url: https://civitai.com/api/download/models/150907?type=Model&format=SafeTensor # ダウンロードリンクを指定
```
```
# 変換スクリプトの使用例
python ./diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py --from_safetensors \