Update README.md
Browse files
README.md
CHANGED
|
@@ -1,35 +1,38 @@
|
|
| 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 |
-
await
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
| 35 |

|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-to-image
|
| 3 |
+
---
|
| 4 |
+
# Hyper-SD - Onnx Olive DirectML Optimized
|
| 5 |
+
|
| 6 |
+
## Original Model
|
| 7 |
+
https://huggingface.co/ByteDance/Hyper-SD
|
| 8 |
+
|
| 9 |
+
## C# Inference Demo
|
| 10 |
+
https://github.com/saddam213/OnnxStack
|
| 11 |
+
|
| 12 |
+
```csharp
|
| 13 |
+
// Create Pipeline
|
| 14 |
+
var pipeline = StableDiffusionXLPipeline.CreatePipeline("D:\\Models\\Hyper-SD-onnx");
|
| 15 |
+
|
| 16 |
+
// Prompt
|
| 17 |
+
var promptOptions = new PromptOptions
|
| 18 |
+
{
|
| 19 |
+
Prompt = "Generate an image of a cunning thief man, with a hood and a smirk, slipping away with a bag of stolen jewels."
|
| 20 |
+
};
|
| 21 |
+
|
| 22 |
+
// Scheduler Options
|
| 23 |
+
var schedulerOptions = pipeline.DefaultSchedulerOptions with
|
| 24 |
+
{
|
| 25 |
+
InferenceSteps = 1,
|
| 26 |
+
GuidanceScale = 0,
|
| 27 |
+
SchedulerType = SchedulerType.DDIM,
|
| 28 |
+
Timesteps = new List<int> { 800 }
|
| 29 |
+
};
|
| 30 |
+
|
| 31 |
+
// Run pipeline
|
| 32 |
+
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
| 33 |
+
|
| 34 |
+
// Save Image Result
|
| 35 |
+
await result.SaveAsync("Result.png");
|
| 36 |
+
```
|
| 37 |
+
## Inference Result
|
| 38 |

|