Instructions to use diffusers/flux2-bnb-4bit-modular with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers/flux2-bnb-4bit-modular with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("diffusers/flux2-bnb-4bit-modular", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
## Setup
|
| 2 |
|
| 3 |
Install the latest version of `diffusers`
|
|
@@ -28,4 +32,4 @@ pipe.load_components(torch_dtype=torch.bfloat16, device_map="cuda")
|
|
| 28 |
prompt = "a photo of a cat"
|
| 29 |
outputs = pipe(prompt=prompt, num_inference_steps=28, output="images")
|
| 30 |
outputs[0].save("flux2-bnb-modular.png")
|
| 31 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-to-image
|
| 3 |
+
library_name: diffusers
|
| 4 |
+
---
|
| 5 |
## Setup
|
| 6 |
|
| 7 |
Install the latest version of `diffusers`
|
|
|
|
| 32 |
prompt = "a photo of a cat"
|
| 33 |
outputs = pipe(prompt=prompt, num_inference_steps=28, output="images")
|
| 34 |
outputs[0].save("flux2-bnb-modular.png")
|
| 35 |
+
```
|