Update README.md
Browse files
README.md
CHANGED
@@ -6,9 +6,7 @@ pipeline_tag: text-to-image
|
|
6 |
library_name: diffusers
|
7 |
libraries: ONNX
|
8 |
---
|
9 |
-
|
10 |
-
pipeline_tag: text-to-image
|
11 |
-
---
|
12 |
# black-forest-labs/FLUX.1-schnell - AMD Optimized ONNX
|
13 |
|
14 |
## Original Model
|
@@ -19,17 +17,35 @@ _io32: model input is fp32, model will convert the input to fp16, perform ops in
|
|
19 |
|
20 |
_io16: model input is fp16, perform ops in fp16 and write the final result in fp16
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
// csharp example
|
24 |
// Create Pipeline
|
25 |
-
var pipeline =
|
26 |
// Prompt
|
27 |
var promptOptions = new PromptOptions
|
28 |
{
|
29 |
Prompt = "a majestic Royal Bengal Tiger on the mountain top overlooking beatiful Lake Tahoe snowy mountains and deep blue lake, deep blue sky, ultra hd, 8k, photorealistic"
|
30 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
// Run pipeline
|
32 |
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
|
|
33 |
// Save Image Result
|
34 |
await result.SaveAsync("Result.png");
|
35 |
```
|
|
|
6 |
library_name: diffusers
|
7 |
libraries: ONNX
|
8 |
---
|
9 |
+
|
|
|
|
|
10 |
# black-forest-labs/FLUX.1-schnell - AMD Optimized ONNX
|
11 |
|
12 |
## Original Model
|
|
|
17 |
|
18 |
_io16: model input is fp16, perform ops in fp16 and write the final result in fp16
|
19 |
|
20 |
+
## Running
|
21 |
+
|
22 |
+
### 1. Using Amuse GUI Application
|
23 |
+
Use Amuse GUI application to run it: https://www.amuse-ai.com/
|
24 |
+
|
25 |
+
|
26 |
+
### 2. C# Inference Demo
|
27 |
+
https://github.com/TensorStack-AI/OnnxStack
|
28 |
+
|
29 |
+
```
|
30 |
// csharp example
|
31 |
// Create Pipeline
|
32 |
+
var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\Flux.1-schnell_amdgpu");
|
33 |
// Prompt
|
34 |
var promptOptions = new PromptOptions
|
35 |
{
|
36 |
Prompt = "a majestic Royal Bengal Tiger on the mountain top overlooking beatiful Lake Tahoe snowy mountains and deep blue lake, deep blue sky, ultra hd, 8k, photorealistic"
|
37 |
};
|
38 |
+
// Scheduler Options
|
39 |
+
var schedulerOptions = pipeline.DefaultSchedulerOptions with
|
40 |
+
{
|
41 |
+
InferenceSteps = 4,
|
42 |
+
GuidanceScale = 1.0f,
|
43 |
+
SchedulerType = SchedulerType.FlowMatchEulerDiscrete,
|
44 |
+
};
|
45 |
+
|
46 |
// Run pipeline
|
47 |
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
48 |
+
|
49 |
// Save Image Result
|
50 |
await result.SaveAsync("Result.png");
|
51 |
```
|