Update README.md
Browse files
README.md
CHANGED
|
@@ -1,37 +1,37 @@
|
|
| 1 |
-
---
|
| 2 |
-
pipeline_tag: text-to-image
|
| 3 |
-
---
|
| 4 |
-
#FLUX.1-schnell - Onnx Olive DirectML Optimized
|
| 5 |
-
|
| 6 |
-
## Original Model
|
| 7 |
-
https://huggingface.co/black-forest-labs/FLUX.1-schnell
|
| 8 |
-
|
| 9 |
-
## C# Inference Demo
|
| 10 |
-
https://github.com/TensorStack-AI/OnnxStack
|
| 11 |
-
|
| 12 |
-
```csharp
|
| 13 |
-
// Create Pipeline
|
| 14 |
-
var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\Flux_schnell-f32-onnx");
|
| 15 |
-
|
| 16 |
-
// Prompt
|
| 17 |
-
var promptOptions = new PromptOptions
|
| 18 |
-
{
|
| 19 |
-
Prompt = "Create an image of a wise old wizard with a long white beard, holding a staff topped with a crystal and casting a spell"
|
| 20 |
-
};
|
| 21 |
-
|
| 22 |
-
// Scheduler Options
|
| 23 |
-
var schedulerOptions = pipeline.DefaultSchedulerOptions with
|
| 24 |
-
{
|
| 25 |
-
GuidanceScale = 0f,
|
| 26 |
-
InferenceSteps = 4,
|
| 27 |
-
SchedulerType = SchedulerType.FlowMatchEulerDiscrete,
|
| 28 |
-
};
|
| 29 |
-
|
| 30 |
-
// Run pipeline
|
| 31 |
-
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
| 32 |
-
|
| 33 |
-
// Save Image Result
|
| 34 |
-
await result.SaveAsync("Result.png");
|
| 35 |
-
```
|
| 36 |
-
## Inference Result
|
| 37 |

|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-to-image
|
| 3 |
+
---
|
| 4 |
+
# FLUX.1-schnell - Onnx Olive DirectML Optimized
|
| 5 |
+
|
| 6 |
+
## Original Model
|
| 7 |
+
https://huggingface.co/black-forest-labs/FLUX.1-schnell
|
| 8 |
+
|
| 9 |
+
## C# Inference Demo
|
| 10 |
+
https://github.com/TensorStack-AI/OnnxStack
|
| 11 |
+
|
| 12 |
+
```csharp
|
| 13 |
+
// Create Pipeline
|
| 14 |
+
var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\Flux_schnell-f32-onnx");
|
| 15 |
+
|
| 16 |
+
// Prompt
|
| 17 |
+
var promptOptions = new PromptOptions
|
| 18 |
+
{
|
| 19 |
+
Prompt = "Create an image of a wise old wizard with a long white beard, holding a staff topped with a crystal and casting a spell"
|
| 20 |
+
};
|
| 21 |
+
|
| 22 |
+
// Scheduler Options
|
| 23 |
+
var schedulerOptions = pipeline.DefaultSchedulerOptions with
|
| 24 |
+
{
|
| 25 |
+
GuidanceScale = 0f,
|
| 26 |
+
InferenceSteps = 4,
|
| 27 |
+
SchedulerType = SchedulerType.FlowMatchEulerDiscrete,
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
// Run pipeline
|
| 31 |
+
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
| 32 |
+
|
| 33 |
+
// Save Image Result
|
| 34 |
+
await result.SaveAsync("Result.png");
|
| 35 |
+
```
|
| 36 |
+
## Inference Result
|
| 37 |

|