File size: 1,841 Bytes
24c83c5 3899264 346e5dc 450c139 e399380 450c139 e399380 450c139 f3ca547 450c139 9860990 450c139 346e5dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
---
base_model:
- mikeyandfriends/PixelWave_FLUX.1-dev_03
base_model_relation: quantized
library_name: diffusers
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
language:
- en
pipeline_tag: text-to-image
---
For more information (including how to compress models yourself), check out https://huggingface.co/DFloat11 and https://github.com/LeanModels/DFloat11
Feel free to request for other models for compression as well, ~~although I currently only know how to compress models based on the Flux architecture~~.
### How to Use
#### `diffusers`
1. Install the DFloat11 pip package *(installs the CUDA kernel automatically; requires a CUDA-compatible GPU and PyTorch installed)*:
```bash
pip install dfloat11[cuda12]
# or if you have CUDA version 11:
# pip install dfloat11[cuda11]
```
2. To use the DFloat11 model, run the following example code in Python:
```python
import torch
from diffusers import FluxPipeline
from dfloat11 import DFloat11Model
pipe = FluxPipeline.from_pretrained("mikeyandfriends/PixelWave_FLUX.1-dev_03", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
DFloat11Model.from_pretrained('mingyi456/PixelWave_FLUX.1-dev_03-DF11', device='cpu', bfloat16_model=pipe.transformer)
prompt = "A futuristic cityscape at sunset, with flying cars, neon lights, and reflective water canals"
image = pipe(
prompt,
guidance_scale=3.5,
num_inference_steps=30,
max_sequence_length=256,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save("PixelWave_FLUX.1-dev_03.png")
```
#### ComfyUI
Follow the instructions (have not tested myself) here: https://github.com/LeanModels/ComfyUI-DFloat11 |