Instructions to use black-forest-labs/FLUX.1-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.1-dev with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
TypeError: BFloat16 is not supported on MPS
#93
by onefashion - opened
mac m3芯片,出图时,出现这个问题要怎么解决
need to define flux rope like in this example
https://dev.to/0xkoji/run-flux1-on-m3-mac-with-diffusers-9m5
Check your Torch version, bfloat16 for MPS support started with torch 2.3, and some missing support was added in 2.3.1.
Oh, and ts broken in torch 2.4, it should be fixed in the next version but people are reporting there been a big decrease in speed in that version.