Upload 6 files
Browse files- .gitattributes +1 -0
- README.md +34 -37
- Sample.png +2 -2
- Sample1.png +3 -0
- Sample2.png +2 -2
- Sample3.png +2 -2
.gitattributes
CHANGED
@@ -39,3 +39,4 @@ Sample.png filter=lfs diff=lfs merge=lfs -text
|
|
39 |
Sample2.png filter=lfs diff=lfs merge=lfs -text
|
40 |
Sample3.png filter=lfs diff=lfs merge=lfs -text
|
41 |
Sample4.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
39 |
Sample2.png filter=lfs diff=lfs merge=lfs -text
|
40 |
Sample3.png filter=lfs diff=lfs merge=lfs -text
|
41 |
Sample4.png filter=lfs diff=lfs merge=lfs -text
|
42 |
+
Sample1.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,38 +1,35 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
##
|
7 |
-
https://
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
//
|
14 |
-
var
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
//
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
await result.SaveAsync("Result.png");
|
36 |
-
```
|
37 |
-
## Inference Result
|
38 |
![Intro Image](Sample.png)
|
|
|
1 |
+
# SDXL Lightning - Onnx Olive DirectML Optimized
|
2 |
+
|
3 |
+
## Original Model
|
4 |
+
https://huggingface.co/ByteDance/SDXL-Lightning
|
5 |
+
|
6 |
+
## C# Inference Demo
|
7 |
+
https://github.com/saddam213/OnnxStack
|
8 |
+
|
9 |
+
```csharp
|
10 |
+
// Create Pipeline
|
11 |
+
var pipeline = StableDiffusionXLPipeline.CreatePipeline("D:\\Repositories\\SDXL-Lightning-onnx");
|
12 |
+
|
13 |
+
// Prompt
|
14 |
+
var promptOptions = new PromptOptions
|
15 |
+
{
|
16 |
+
Prompt = "Craft an image of a galaxy far, far away, with swirling nebulae and distant stars painting the cosmic canvas"
|
17 |
+
};
|
18 |
+
|
19 |
+
// Scheduler Options
|
20 |
+
var schedulerOptions = pipeline.DefaultSchedulerOptions with
|
21 |
+
{
|
22 |
+
SchedulerType = SchedulerType.Euler,
|
23 |
+
InferenceSteps = 8,
|
24 |
+
GuidanceScale = 0,
|
25 |
+
BetaSchedule = BetaScheduleType.Linear
|
26 |
+
};
|
27 |
+
|
28 |
+
// Run pipeline
|
29 |
+
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
30 |
+
|
31 |
+
// Save Image Result
|
32 |
+
await result.SaveAsync("Result.png");
|
33 |
+
```
|
34 |
+
## Inference Result
|
|
|
|
|
|
|
35 |
![Intro Image](Sample.png)
|
Sample.png
CHANGED
Git LFS Details
|
Git LFS Details
|
Sample1.png
ADDED
Git LFS Details
|
Sample2.png
CHANGED
Git LFS Details
|
Git LFS Details
|
Sample3.png
CHANGED
Git LFS Details
|
Git LFS Details
|