Instructions to use amd/FLUX.1-dev_io32_amdgpu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use amd/FLUX.1-dev_io32_amdgpu with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("amd/FLUX.1-dev_io32_amdgpu", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
| license: other | |
| license_name: flux-1-dev-non-commercial-license | |
| license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md | |
| base_model: | |
| - black-forest-labs/FLUX.1-dev | |
| pipeline_tag: text-to-image | |
| library_name: diffusers | |
| # black-forest-labs/FLUX.1-dev - AMD Optimized ONNX | |
| ## Original Model | |
| https://huggingface.co/black-forest-labs/FLUX.1-dev | |
| ## _io32/16 | |
| _io32: model input is fp32, model will convert the input to fp16, perform ops in fp16 and write the final result in fp32 | |
| _io16: model input is fp16, perform ops in fp16 and write the final result in fp16 | |
| ## Running | |
| ### 1. Using Amuse GUI Application | |
| Use Amuse GUI application to run it: https://www.amuse-ai.com/ | |
| use _io32 model to run with Amuse application | |
| ### 2. Inference Demo | |
| https://github.com/TensorStack-AI/OnnxStack | |
| ``` | |
| // csharp example | |
| // Create Pipeline | |
| var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\Flux.1-dev_amdgpu"); | |
| // Prompt | |
| var promptOptions = new PromptOptions | |
| { | |
| 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" | |
| }; | |
| // Scheduler Options | |
| var schedulerOptions = pipeline.DefaultSchedulerOptions with | |
| { | |
| InferenceSteps = 50, | |
| GuidanceScale = 3.5f, | |
| SchedulerType = SchedulerType.FlowMatchEulerDiscrete, | |
| }; | |
| // Run pipeline | |
| var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions); | |
| // Save Image Result | |
| await result.SaveAsync("Result.png"); | |
| ``` | |
| ## Inference Result | |
|  |