Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit f6b6688

Browse files
committed
Merge branch 'master' of github.com:saddam213/OnnxStack
2 parents d4aa01a + 35a1880 commit f6b6688

File tree

8 files changed

+117
-1
lines changed

8 files changed

+117
-1
lines changed
542 KB
Loading
447 KB
Loading
506 KB
Loading
369 KB
Loading
522 KB
Loading
492 KB
Loading

OnnxStack.UI/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<p align="center" width="100%">
2+
<img width="80%" src="Assets/OnnxStack - 640x320.png">
3+
</p>
4+
5+
6+
![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/saddam213/OnnxStack)
7+
[![Core Badge](https://img.shields.io/nuget/v/OnnxStack.Core?color=4bc51e&label=OnnxStack.Core)](https://www.nuget.org/packages/OnnxStack.Core)
8+
![Nuget](https://img.shields.io/nuget/dt/OnnxStack.Core)
9+
[![StableDiffusion Badge](https://img.shields.io/nuget/v/OnnxStack.StableDiffusion?color=4bc51e&label=OnnxStack.StableDiffusion)](https://www.nuget.org/packages/OnnxStack.StableDiffusion)
10+
![Nuget](https://img.shields.io/nuget/dt/OnnxStack.StableDiffusion)
11+
12+
13+
14+
### Welcome to OnnxStack WPF GUI!
15+
This project is a sample WPF GUI of the OnnxStack library's Inference Stable Diffusion implementation.
16+
17+
### **Prompt**
18+
19+
Stable Diffusion models take a text prompt and create an image that represents the text.
20+
21+
*Example:*
22+
`
23+
final fantasy style cyberpunk desert assassin girl with thigh-high boot
24+
`
25+
26+
### **Negative Prompt**
27+
28+
A negative prompt can be provided to guide the inference to exclude in calculations
29+
30+
*Example:*
31+
32+
`
33+
painting, drawing, sketches, monochrome, grayscale, illustration, anime, cartoon, graphic, text, crayon, graphite, abstract, easynegative, low quality, normal quality, worst quality, lowres, close up, cropped, out of frame, jpeg artifacts, duplicate, morbid, mutilated, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, glitch, deformed, mutated, cross-eyed, ugly, dehydrated, bad anatomy, bad proportions, gross proportions, cloned face, disfigured, malformed limbs, missing arms, missing legs fused fingers, too many fingers,extra fingers, extra limbs,, extra arms, extra legs,disfigured,
34+
`
35+
36+
### **Schedulers**
37+
38+
Many different scheduler algorithms can be used for this computation, each having its pro- and cons.
39+
So far `OnnxStack.StableDiffusion` as included `LMS Discrete`, `Euler`, `Euler Ancestral`, `DDPM`, `DDIM`, `KDPM2` options with more in the works.
40+
41+
*Example:*
42+
| LMS Scheduler | Euler Scheduler | Euler Ancestral Scheduler | DDPM Scheduler | DDIM Scheduler | KDPM2 Scheduler
43+
| :--- | :--- | :--- | :--- | :--- | :--- |
44+
<img src="../Assets/Samples/1207582124_30_7.5_30_LMS.png" width="256" alt="Image of browser inferencing on sample images."/> | <img src="../Assets/Samples/1207582124_30_7.5_30_Euler.png" width="256" alt="Image of browser inferencing on sample images."/> | <img src="../Assets/Samples/1207582124_30_7.5_30_EulerAncestral.png" width="256" alt="Image of browser inferencing on sample images."/> | <img src="../Assets/Samples/1207582124_30_7.5_30_DDPM.png" width="256" alt="Image of browser inferencing on sample images."/> | <img src="../Assets/Samples/1207582124_30_7.5_30_DDIM.png" width="256" alt="Image of browser inferencing on sample images."/> | <img src="../Assets/Samples/1207582124_30_7.5_30_KDPM2.png" width="256" alt="Image of browser inferencing on sample images."/> |
45+
46+
Model: OpenJourney V4 Seed: 1207582124 GuidanceScale: 7.5 NumInferenceSteps: 30 Prompt: A cyberpunk puppy
47+
48+
__________________________
49+
50+
# Getting Started
51+
52+
53+
## ONNX Model Download
54+
You will need an ONNX compatible model to use, Hugging Face is a great place to download the Stable Diffusion models
55+
56+
Download the [ONNX Stable Diffusion models from Hugging Face](https://huggingface.co/models?sort=downloads&search=Stable+Diffusion).
57+
58+
- [Stable Diffusion Models v1.4](https://huggingface.co/CompVis/stable-diffusion-v1-4/tree/onnx)
59+
- [Stable Diffusion Models v1.5](https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/onnx)
60+
61+
62+
Once you have selected a model version repo, click `Files and Versions`, then select the `ONNX` branch. If there isn't an ONNX model branch available, use the `main` branch and convert it to ONNX. See the [ONNX conversion tutorial for PyTorch](https://learn.microsoft.com/windows/ai/windows-ml/tutorials/pytorch-convert-model) for more information.
63+
64+
Clone the model repo:
65+
```text
66+
git lfs install
67+
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 -b onnx
68+
```
69+
70+
71+
## Stable Diffusion Models We've Converted To ONNX And Tested
72+
The following are othe stable diffusion models we've converted to ONNX and tested with OnnxStack.
73+
74+
- [OpenJourney V4](https://huggingface.co/TheyCallMeHex/OpenJourney-V4-ONNX)
75+
- [DreamLike PhotoReal 2.0](https://huggingface.co/TheyCallMeHex/DreamLike-PhotoReal-2.0-ONNX)
76+
- [CyberPunk Anime Diffusion](https://huggingface.co/TheyCallMeHex/Cyberpunk-Anime-Diffusion-ONNX)
77+
- [InkPunk Diffusion](https://huggingface.co/TheyCallMeHex/Inkpunk-Diffusion-ONNX)
78+
- [Mo-Di Diffusion](https://huggingface.co/TheyCallMeHex/Mo-Di-Diffusion-ONNX)
79+
- [epiCRealism](https://huggingface.co/TheyCallMeHex/epiCRealism-ONNX)
80+
- [Comic Diffusion](https://huggingface.co/TheyCallMeHex/Comic-Diffusion-ONNX)
81+
- [Redshift Diffusion](https://huggingface.co/TheyCallMeHex/Redshift-Diffusion-ONNX)
82+
83+
## Hardware Requirements
84+
You can choose between `Cpu` and `DirectML`(GPU) for inference,
85+
Other `Microsoft.ML.OnnxRuntime.*` executors like `Cuda` may work but are untested
86+
87+
`Cpu` > 12GB RAM
88+
89+
`DirectML` > 10GB VRAM
90+
91+
92+
93+
## Contribution
94+
95+
We welcome contributions to OnnxStack! If you have any ideas, bug reports, or improvements, feel free to open an issue or submit a pull request.
96+
97+
98+
99+
__________________________
100+
## Resources
101+
- [ONNX Runtime C# API Doc](https://onnxruntime.ai/docs/api/csharp/api)
102+
- [Get Started with C# in ONNX Runtime](https://onnxruntime.ai/docs/get-started/with-csharp.html)
103+
- [Hugging Face Stable Diffusion Blog](https://huggingface.co/blog/stable_diffusion)

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ painting, drawing, sketches, monochrome, grayscale, illustration, anime, cartoon
4242
### **Schedulers**
4343

4444
Many different scheduler algorithms can be used for this computation, each having its pro- and cons.
45-
So far `OnnxStack.StableDiffusion` as included `LMS Discrete`, `Euler Ancestral` and `DDPM` options with more in the works.
45+
So far `OnnxStack.StableDiffusion` as included `LMS Discrete`, `Euler Ancestral`, `DDPM`, `DDIM`, and `KDPM2` options with more in the works.
4646

4747
*Example:*
4848
| LMS Scheduler | Euler Ancestral Scheduler | DDPM Scheduler |
@@ -132,6 +132,19 @@ git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 -b onnx
132132
```
133133

134134

135+
## Stable Diffusion Models We've Converted To ONNX And Tested
136+
The following are othe stable diffusion models we've converted to ONNX and tested with OnnxStack.
137+
138+
- [OpenJourney V4](https://huggingface.co/TheyCallMeHex/OpenJourney-V4-ONNX)
139+
- [DreamLike PhotoReal 2.0](https://huggingface.co/TheyCallMeHex/DreamLike-PhotoReal-2.0-ONNX)
140+
- [CyberPunk Anime Diffusion](https://huggingface.co/TheyCallMeHex/Cyberpunk-Anime-Diffusion-ONNX)
141+
- [InkPunk Diffusion](https://huggingface.co/TheyCallMeHex/Inkpunk-Diffusion-ONNX)
142+
- [Mo-Di Diffusion](https://huggingface.co/TheyCallMeHex/Mo-Di-Diffusion-ONNX)
143+
- [epiCRealism](https://huggingface.co/TheyCallMeHex/epiCRealism-ONNX)
144+
- [Comic Diffusion](https://huggingface.co/TheyCallMeHex/Comic-Diffusion-ONNX)
145+
- [Redshift Diffusion](https://huggingface.co/TheyCallMeHex/Redshift-Diffusion-ONNX)
146+
147+
135148
## Hardware Requirements
136149
You can choose between `Cpu` and `DirectML`(GPU) for inference,
137150
Other `Microsoft.ML.OnnxRuntime.*` executors like `Cuda` may work but are untested

0 commit comments

Comments
 (0)