Groundspout commited on
Commit
30a86e6
·
1 Parent(s): b860881

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -105
README.md CHANGED
@@ -1,105 +1,12 @@
1
- # Stable Diffusion ONNX UI
2
-
3
- * [First installation](#first-installation)
4
- * [How to add models](#how-to-add-models)
5
- * [Run](#run)
6
- * [Updating](#updating)
7
-
8
- Dead simple gui with support for latest [Diffusers (v0.12.0)](https://github.com/huggingface/diffusers/) on Windows with AMD graphic cards (or CPU, thanks to ONNX and DirectML) with [Stable Diffusion 2.1](https://huggingface.co/stabilityai/stable-diffusion-2-1) or any other model, even inpainting finetuned ones.
9
-
10
- Supported schedulers: DDIM, LMS, PNDM, Euler.
11
-
12
- Built with Gradio.
13
-
14
- ![image](./screenshots/app.png)
15
-
16
- ![image](./screenshots/inpainting.png)
17
-
18
- ## First installation
19
-
20
- Prerequisites
21
-
22
- * [Python 3.10](https://www.python.org/downloads/)
23
- * [Git for windows](https://git-scm.com/download/win)
24
- * An [huggingface.co](https://huggingface.co) account
25
- * For a better experience, the [latest version of Powershell](https://github.com/PowerShell/PowerShell/releases)
26
-
27
- From an empty folder:
28
-
29
- ```ps1
30
- python -m venv venv
31
- .\venv\Scripts\activate
32
- python -m pip install --upgrade pip
33
- pip install wheel wget
34
- pip install git+https://github.com/huggingface/diffusers.git
35
- pip install transformers onnxruntime onnx gradio torch ftfy spacy scipy OmegaConf accelerate
36
- pip install onnxruntime-directml --force-reinstall
37
- pip install protobuf==3.20.2
38
- python -m wget https://raw.githubusercontent.com/JbPasquier/stable-diffusion-onnx-ui/main/app.py
39
- python -m wget https://raw.githubusercontent.com/huggingface/diffusers/main/scripts/convert_original_stable_diffusion_to_diffusers.py -o convert_original_stable_diffusion_to_diffusers.py
40
- python -m wget https://raw.githubusercontent.com/huggingface/diffusers/main/scripts/convert_stable_diffusion_checkpoint_to_onnx.py -o convert_stable_diffusion_checkpoint_to_onnx.py
41
- python -m wget https://raw.githubusercontent.com/runwayml/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml -o v1-inference.yaml
42
- python -m wget https://raw.githubusercontent.com/runwayml/stable-diffusion/main/configs/stable-diffusion/v1-inpainting-inference.yaml -o v1-inpainting-inference.yaml
43
- mkdir model
44
- ```
45
-
46
- ## How to add models
47
-
48
- ### Stable Diffusion
49
-
50
- ```ps1
51
- python convert_stable_diffusion_checkpoint_to_onnx.py --model_path="stabilityai/stable-diffusion-2-1" --output_path="model/stable_diffusion_onnx"
52
- ```
53
-
54
- ### Stable Diffusion Inpainting
55
-
56
- ```ps1
57
- python convert_stable_diffusion_checkpoint_to_onnx.py --model_path="stabilityai/stable-diffusion-2-inpainting" --output_path="model/stable_diffusion_inpainting_onnx"
58
- ```
59
-
60
- ### Other from Hugging Face
61
-
62
- ```ps1
63
- python convert_stable_diffusion_checkpoint_to_onnx.py --model_path="nitrosocke/Nitro-Diffusion" --output_path="model/nitro_diffusion_onnx"
64
- ```
65
-
66
- ### Other from somewhere else
67
-
68
- Replace `some_file.ckpt` with the path to your ckpt one.
69
-
70
- ```ps1
71
- python convert_original_stable_diffusion_to_diffusers.py --checkpoint_path="./some_file.ckpt" --dump_path="./some_file"
72
- python convert_stable_diffusion_checkpoint_to_onnx.py --model_path="./some_file" --output_path="model/some_onnx"
73
- ```
74
-
75
- ## Run
76
-
77
- ```ps1
78
- # Ensure that you are in the virtualenv
79
- .\venv\Scripts\activate
80
-
81
- # Your computer only
82
- python app.py
83
-
84
- # Local network
85
- python app.py --local
86
-
87
- # The whole internet
88
- python app.py --share
89
-
90
- # Use CPU instead of AMD GPU
91
- python app.py --cpu-only
92
- ```
93
-
94
- Notice that inpainting provide way better results with a proper model like [stable-diffusion-inpainting](https://huggingface.co/stabilityai/stable-diffusion-2-inpainting)
95
-
96
- ## Updating
97
-
98
- Remove `venv` folder and `*.py` files and restart the [First installation](#first-installation) process.
99
-
100
- ## Credits
101
-
102
- Inspired by:
103
-
104
- * [azuritecoin/OnnxDiffusersUI](https://github.com/azuritecoin/OnnxDiffusersUI)
105
- * [averad/256c507baa3dcc9464203dc14610d674](https://gist.github.com/averad/256c507baa3dcc9464203dc14610d674)
 
1
+ ---
2
+ title: Ljnhsdf
3
+ emoji: 🔥
4
+ colorFrom: yellow
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: 3.35.2
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference