hishamchow commited on
Commit
f83e007
·
verified ·
1 Parent(s): 4f18df8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -7
README.md CHANGED
@@ -6,9 +6,8 @@ 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,19 +18,37 @@ _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
- ```csharp
 
 
 
 
 
 
 
 
 
23
  // csharp example
24
  // Create Pipeline
25
- var pipeline = StableDiffusionPipeline.CreatePipeline("D:\\Models\\FLUX.1-schnell_io32_amdgpu");
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
- ```
36
  ## Inference Result
37
  ![Intro Image](sample.png)
 
6
  library_name: diffusers
7
  libraries: ONNX
8
  ---
9
+
10
+
 
11
  # black-forest-labs/FLUX.1-schnell - AMD Optimized ONNX
12
 
13
  ## Original Model
 
18
 
19
  _io16: model input is fp16, perform ops in fp16 and write the final result in fp16
20
 
21
+ ## Running
22
+
23
+ ### 1. Using Amuse GUI Application
24
+ Use Amuse GUI application to run it: https://www.amuse-ai.com/
25
+
26
+
27
+ ### 2. C# Inference Demo
28
+ https://github.com/TensorStack-AI/OnnxStack
29
+
30
+ ```
31
  // csharp example
32
  // Create Pipeline
33
+ var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\Flux.1-dev_amdgpu");
34
  // Prompt
35
  var promptOptions = new PromptOptions
36
  {
37
  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"
38
  };
39
+ // Scheduler Options
40
+ var schedulerOptions = pipeline.DefaultSchedulerOptions with
41
+ {
42
+ InferenceSteps = 50,
43
+ GuidanceScale = 3.5f,
44
+ SchedulerType = SchedulerType.FlowMatchEulerDiscrete,
45
+ };
46
+
47
  // Run pipeline
48
  var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
49
+
50
  // Save Image Result
51
+ await result.SaveAsync("sample.png");
52
+
53
  ## Inference Result
54
  ![Intro Image](sample.png)