Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: flux-1-dev-non-commercial-license
|
| 4 |
+
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
| 5 |
+
base_model:
|
| 6 |
+
- black-forest-labs/FLUX.1-dev
|
| 7 |
+
pipeline_tag: text-to-image
|
| 8 |
+
library_name: diffusers
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# black-forest-labs/FLUX.1-dev - AMD Optimized ONNX
|
| 12 |
+
|
| 13 |
+
## Original Model
|
| 14 |
+
https://huggingface.co/black-forest-labs/FLUX.1-dev
|
| 15 |
+
|
| 16 |
+
## _io32/16
|
| 17 |
+
_io32: model input is fp32, model will convert the input to fp16, perform ops in fp16 and write the final result in fp32
|
| 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 |
+
|
| 25 |
+
Use Amuse GUI application to run it: https://www.amuse-ai.com/
|
| 26 |
+
|
| 27 |
+
use _io32 model to run with Amuse application
|
| 28 |
+
|
| 29 |
+
### 2. Inference Demo
|
| 30 |
+
|
| 31 |
+
https://github.com/TensorStack-AI/OnnxStack
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
// csharp example
|
| 35 |
+
// Create Pipeline
|
| 36 |
+
var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\Flux.1-dev_amdgpu");
|
| 37 |
+
// Prompt
|
| 38 |
+
var promptOptions = new PromptOptions
|
| 39 |
+
{
|
| 40 |
+
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"
|
| 41 |
+
};
|
| 42 |
+
// Scheduler Options
|
| 43 |
+
var schedulerOptions = pipeline.DefaultSchedulerOptions with
|
| 44 |
+
{
|
| 45 |
+
InferenceSteps = 50,
|
| 46 |
+
GuidanceScale = 3.5f,
|
| 47 |
+
SchedulerType = SchedulerType.FlowMatchEulerDiscrete,
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
// Run pipeline
|
| 51 |
+
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);
|
| 52 |
+
|
| 53 |
+
// Save Image Result
|
| 54 |
+
await result.SaveAsync("Result.png");
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Inference Result
|
| 58 |
+

|