Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -66,9 +66,10 @@ from diffusers.utils import load_image
|
|
66 |
from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
67 |
|
68 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
69 |
-
|
70 |
|
71 |
-
|
|
|
72 |
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16)
|
73 |
pipe.to("cuda")
|
74 |
|
@@ -96,17 +97,15 @@ image = pipe(
|
|
96 |
import torch
|
97 |
from diffusers.utils import load_image
|
98 |
|
99 |
-
# https://github.com/huggingface/diffusers/pull/11350, after merging, you can directly import from diffusers
|
100 |
-
# from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
101 |
-
|
102 |
# use local files for this moment
|
103 |
from pipeline_flux_controlnet import FluxControlNetPipeline
|
104 |
from controlnet_flux import FluxControlNetModel
|
105 |
|
106 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
107 |
-
|
108 |
|
109 |
-
|
|
|
110 |
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=[controlnet], torch_dtype=torch.bfloat16) # use [] to enable multi-CNs
|
111 |
pipe.to("cuda")
|
112 |
|
|
|
66 |
from diffusers import FluxControlNetPipeline, FluxControlNetModel
|
67 |
|
68 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
69 |
+
controlnet_model_union_fp8 = 'ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8'
|
70 |
|
71 |
+
# Load using FP8 data type
|
72 |
+
controlnet = FluxControlNetModel.from_pretrained(controlnet_model_union_fp8, torch_dtype=torch.float8_e4m3fn)
|
73 |
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=controlnet, torch_dtype=torch.bfloat16)
|
74 |
pipe.to("cuda")
|
75 |
|
|
|
97 |
import torch
|
98 |
from diffusers.utils import load_image
|
99 |
|
|
|
|
|
|
|
100 |
# use local files for this moment
|
101 |
from pipeline_flux_controlnet import FluxControlNetPipeline
|
102 |
from controlnet_flux import FluxControlNetModel
|
103 |
|
104 |
base_model = 'black-forest-labs/FLUX.1-dev'
|
105 |
+
controlnet_model_union_fp8 = 'ABDALLALSWAITI/FLUX.1-dev-ControlNet-Union-Pro-2.0-fp8'
|
106 |
|
107 |
+
# Load using FP8 data type
|
108 |
+
controlnet = FluxControlNetModel.from_pretrained(controlnet_model_union_fp8, torch_dtype=torch.float8_e4m3fn)
|
109 |
pipe = FluxControlNetPipeline.from_pretrained(base_model, controlnet=[controlnet], torch_dtype=torch.bfloat16) # use [] to enable multi-CNs
|
110 |
pipe.to("cuda")
|
111 |
|