Text-to-Image
Diffusers
Safetensors
English
quantized
fp8
e4m3
Text-to-Image
ControlNet
Diffusers
Flux.1-dev
image-generation
Stable Diffusion
quantization
reduced-precision
Instructions to use ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8", 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
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -146,7 +146,7 @@ from diffusers.utils import load_image
|
|
| 146 |
from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
| 147 |
|
| 148 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
| 149 |
-
controlnet_model_union_fp8 = '
|
| 150 |
|
| 151 |
# Load using FP8 data type
|
| 152 |
controlnet = FluxControlNetModel.from_pretrained(controlnet_model_union_fp8, torch_dtype=torch.float8_e4m3fn)
|
|
@@ -162,7 +162,7 @@ See `fp8_inference_example.py` for a complete example.
|
|
| 162 |
To push your FP8 quantized model to the Hugging Face Hub, use the included script:
|
| 163 |
|
| 164 |
```bash
|
| 165 |
-
python push_model_to_hub.py --repo_id "
|
| 166 |
```
|
| 167 |
|
| 168 |
You will need to have the `huggingface_hub` library installed and be logged in with your Hugging Face credentials.
|
|
|
|
| 146 |
from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
| 147 |
|
| 148 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
| 149 |
+
controlnet_model_union_fp8 = 'ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8'
|
| 150 |
|
| 151 |
# Load using FP8 data type
|
| 152 |
controlnet = FluxControlNetModel.from_pretrained(controlnet_model_union_fp8, torch_dtype=torch.float8_e4m3fn)
|
|
|
|
| 162 |
To push your FP8 quantized model to the Hugging Face Hub, use the included script:
|
| 163 |
|
| 164 |
```bash
|
| 165 |
+
python push_model_to_hub.py --repo_id "ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8"
|
| 166 |
```
|
| 167 |
|
| 168 |
You will need to have the `huggingface_hub` library installed and be logged in with your Hugging Face credentials.
|