Instructions to use diffusers/FLUX.1-dev-bnb-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers/FLUX.1-dev-bnb-4bit 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/FLUX.1-dev-bnb-4bit", 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 Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ pip install -U bitsandbytes
|
|
| 16 |
After installing the required library, you can run the following script:
|
| 17 |
|
| 18 |
```python
|
| 19 |
-
from diffusers import
|
| 20 |
|
| 21 |
pipe = FluxPipeline.from_pretrained(
|
| 22 |
"diffusers/FLUX.1-dev-bnb-4bit",
|
|
@@ -50,7 +50,7 @@ This checkpoint was created with the following script using "black-forest-labs/F
|
|
| 50 |
```python
|
| 51 |
|
| 52 |
import torch
|
| 53 |
-
from diffusers import
|
| 54 |
from diffusers import BitsAndBytesConfig as DiffusersBitsAndBytesConfig
|
| 55 |
from diffusers.quantizers import PipelineQuantizationConfig
|
| 56 |
from transformers import BitsAndBytesConfig as TransformersBitsAndBytesConfig
|
|
|
|
| 16 |
After installing the required library, you can run the following script:
|
| 17 |
|
| 18 |
```python
|
| 19 |
+
from diffusers import FluxPipeline
|
| 20 |
|
| 21 |
pipe = FluxPipeline.from_pretrained(
|
| 22 |
"diffusers/FLUX.1-dev-bnb-4bit",
|
|
|
|
| 50 |
```python
|
| 51 |
|
| 52 |
import torch
|
| 53 |
+
from diffusers import FluxPipeline
|
| 54 |
from diffusers import BitsAndBytesConfig as DiffusersBitsAndBytesConfig
|
| 55 |
from diffusers.quantizers import PipelineQuantizationConfig
|
| 56 |
from transformers import BitsAndBytesConfig as TransformersBitsAndBytesConfig
|