Text-to-Image
Diffusers
Safetensors
English
Text-to-Image
ControlNet
Diffusers
Flux.1-dev
image-generation
Stable Diffusion
Instructions to use Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro", 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
|
@@ -51,7 +51,8 @@ Please install `diffusers` from [the source](https://github.com/huggingface/diff
|
|
| 51 |
import torch
|
| 52 |
from diffusers.utils import load_image
|
| 53 |
|
| 54 |
-
from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
|
|
|
| 55 |
|
| 56 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
| 57 |
controlnet_model_union = 'Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro'
|
|
@@ -86,7 +87,8 @@ image = pipe(
|
|
| 86 |
|
| 87 |
We also support loading multiple ControlNets as before, you can load as
|
| 88 |
```python
|
| 89 |
-
from diffusers import FluxControlNetModel
|
|
|
|
| 90 |
|
| 91 |
controlnet_model_union = 'Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro'
|
| 92 |
controlnet_union = FluxControlNetModel.from_pretrained(controlnet_model_union, torch_dtype=torch.bfloat16)
|
|
|
|
| 51 |
import torch
|
| 52 |
from diffusers.utils import load_image
|
| 53 |
|
| 54 |
+
from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
| 55 |
+
from diffusers.models import FluxMultiControlNetModel
|
| 56 |
|
| 57 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
| 58 |
controlnet_model_union = 'Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro'
|
|
|
|
| 87 |
|
| 88 |
We also support loading multiple ControlNets as before, you can load as
|
| 89 |
```python
|
| 90 |
+
from diffusers import FluxControlNetModel
|
| 91 |
+
from diffusers.models import FluxMultiControlNetModel
|
| 92 |
|
| 93 |
controlnet_model_union = 'Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro'
|
| 94 |
controlnet_union = FluxControlNetModel.from_pretrained(controlnet_model_union, torch_dtype=torch.bfloat16)
|