diffusers 0.30.2__py3-none-any.whl → 0.31.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. diffusers/__init__.py +38 -2
  2. diffusers/configuration_utils.py +12 -0
  3. diffusers/dependency_versions_table.py +1 -1
  4. diffusers/image_processor.py +257 -54
  5. diffusers/loaders/__init__.py +2 -0
  6. diffusers/loaders/ip_adapter.py +5 -1
  7. diffusers/loaders/lora_base.py +14 -7
  8. diffusers/loaders/lora_conversion_utils.py +332 -0
  9. diffusers/loaders/lora_pipeline.py +707 -41
  10. diffusers/loaders/peft.py +1 -0
  11. diffusers/loaders/single_file_utils.py +81 -4
  12. diffusers/loaders/textual_inversion.py +2 -0
  13. diffusers/loaders/unet.py +39 -8
  14. diffusers/models/__init__.py +4 -0
  15. diffusers/models/adapter.py +53 -53
  16. diffusers/models/attention.py +86 -10
  17. diffusers/models/attention_processor.py +169 -133
  18. diffusers/models/autoencoders/autoencoder_kl.py +71 -11
  19. diffusers/models/autoencoders/autoencoder_kl_cogvideox.py +287 -85
  20. diffusers/models/controlnet_flux.py +536 -0
  21. diffusers/models/controlnet_sd3.py +7 -3
  22. diffusers/models/controlnet_sparsectrl.py +0 -1
  23. diffusers/models/embeddings.py +238 -61
  24. diffusers/models/embeddings_flax.py +23 -9
  25. diffusers/models/model_loading_utils.py +182 -14
  26. diffusers/models/modeling_utils.py +283 -46
  27. diffusers/models/normalization.py +79 -0
  28. diffusers/models/transformers/__init__.py +1 -0
  29. diffusers/models/transformers/auraflow_transformer_2d.py +1 -0
  30. diffusers/models/transformers/cogvideox_transformer_3d.py +58 -36
  31. diffusers/models/transformers/pixart_transformer_2d.py +9 -1
  32. diffusers/models/transformers/transformer_cogview3plus.py +386 -0
  33. diffusers/models/transformers/transformer_flux.py +161 -44
  34. diffusers/models/transformers/transformer_sd3.py +7 -1
  35. diffusers/models/unets/unet_2d_condition.py +8 -8
  36. diffusers/models/unets/unet_motion_model.py +41 -63
  37. diffusers/models/upsampling.py +6 -6
  38. diffusers/pipelines/__init__.py +40 -7
  39. diffusers/pipelines/animatediff/__init__.py +2 -0
  40. diffusers/pipelines/animatediff/pipeline_animatediff.py +45 -21
  41. diffusers/pipelines/animatediff/pipeline_animatediff_controlnet.py +44 -20
  42. diffusers/pipelines/animatediff/pipeline_animatediff_sdxl.py +18 -4
  43. diffusers/pipelines/animatediff/pipeline_animatediff_sparsectrl.py +2 -0
  44. diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py +104 -66
  45. diffusers/pipelines/animatediff/pipeline_animatediff_video2video_controlnet.py +1341 -0
  46. diffusers/pipelines/aura_flow/pipeline_aura_flow.py +1 -1
  47. diffusers/pipelines/auto_pipeline.py +39 -8
  48. diffusers/pipelines/cogvideo/__init__.py +6 -0
  49. diffusers/pipelines/cogvideo/pipeline_cogvideox.py +32 -34
  50. diffusers/pipelines/cogvideo/pipeline_cogvideox_fun_control.py +794 -0
  51. diffusers/pipelines/cogvideo/pipeline_cogvideox_image2video.py +837 -0
  52. diffusers/pipelines/cogvideo/pipeline_cogvideox_video2video.py +825 -0
  53. diffusers/pipelines/cogvideo/pipeline_output.py +20 -0
  54. diffusers/pipelines/cogview3/__init__.py +47 -0
  55. diffusers/pipelines/cogview3/pipeline_cogview3plus.py +674 -0
  56. diffusers/pipelines/cogview3/pipeline_output.py +21 -0
  57. diffusers/pipelines/controlnet/pipeline_controlnet.py +9 -1
  58. diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +8 -0
  59. diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +8 -0
  60. diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py +36 -13
  61. diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +9 -1
  62. diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py +8 -1
  63. diffusers/pipelines/controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py +17 -3
  64. diffusers/pipelines/controlnet_sd3/__init__.py +4 -0
  65. diffusers/pipelines/controlnet_sd3/pipeline_stable_diffusion_3_controlnet.py +3 -1
  66. diffusers/pipelines/controlnet_sd3/pipeline_stable_diffusion_3_controlnet_inpainting.py +1153 -0
  67. diffusers/pipelines/ddpm/pipeline_ddpm.py +2 -2
  68. diffusers/pipelines/deepfloyd_if/pipeline_output.py +6 -5
  69. diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py +16 -4
  70. diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py +1 -1
  71. diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py +1 -1
  72. diffusers/pipelines/flux/__init__.py +10 -0
  73. diffusers/pipelines/flux/pipeline_flux.py +53 -20
  74. diffusers/pipelines/flux/pipeline_flux_controlnet.py +984 -0
  75. diffusers/pipelines/flux/pipeline_flux_controlnet_image_to_image.py +988 -0
  76. diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py +1182 -0
  77. diffusers/pipelines/flux/pipeline_flux_img2img.py +850 -0
  78. diffusers/pipelines/flux/pipeline_flux_inpaint.py +1015 -0
  79. diffusers/pipelines/free_noise_utils.py +365 -5
  80. diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py +15 -3
  81. diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py +2 -2
  82. diffusers/pipelines/kolors/pipeline_kolors.py +1 -1
  83. diffusers/pipelines/kolors/pipeline_kolors_img2img.py +14 -11
  84. diffusers/pipelines/kolors/tokenizer.py +4 -0
  85. diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py +1 -1
  86. diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py +1 -1
  87. diffusers/pipelines/latte/pipeline_latte.py +2 -2
  88. diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py +15 -3
  89. diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion_xl.py +15 -3
  90. diffusers/pipelines/lumina/pipeline_lumina.py +2 -2
  91. diffusers/pipelines/pag/__init__.py +6 -0
  92. diffusers/pipelines/pag/pag_utils.py +8 -2
  93. diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py +1 -1
  94. diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py +1544 -0
  95. diffusers/pipelines/pag/pipeline_pag_controlnet_sd_xl.py +2 -2
  96. diffusers/pipelines/pag/pipeline_pag_controlnet_sd_xl_img2img.py +1685 -0
  97. diffusers/pipelines/pag/pipeline_pag_hunyuandit.py +17 -5
  98. diffusers/pipelines/pag/pipeline_pag_kolors.py +1 -1
  99. diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py +1 -1
  100. diffusers/pipelines/pag/pipeline_pag_sd.py +18 -6
  101. diffusers/pipelines/pag/pipeline_pag_sd_3.py +12 -3
  102. diffusers/pipelines/pag/pipeline_pag_sd_animatediff.py +5 -1
  103. diffusers/pipelines/pag/pipeline_pag_sd_img2img.py +1091 -0
  104. diffusers/pipelines/pag/pipeline_pag_sd_xl.py +18 -6
  105. diffusers/pipelines/pag/pipeline_pag_sd_xl_img2img.py +31 -16
  106. diffusers/pipelines/pag/pipeline_pag_sd_xl_inpaint.py +42 -19
  107. diffusers/pipelines/pia/pipeline_pia.py +2 -0
  108. diffusers/pipelines/pipeline_loading_utils.py +225 -27
  109. diffusers/pipelines/pipeline_utils.py +123 -180
  110. diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py +1 -1
  111. diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py +1 -1
  112. diffusers/pipelines/stable_cascade/pipeline_stable_cascade.py +35 -3
  113. diffusers/pipelines/stable_cascade/pipeline_stable_cascade_prior.py +2 -2
  114. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +28 -6
  115. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +1 -1
  116. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +1 -1
  117. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py +241 -81
  118. diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py +12 -3
  119. diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_img2img.py +20 -4
  120. diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py +3 -3
  121. diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py +1 -1
  122. diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py +16 -4
  123. diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py +16 -4
  124. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +16 -4
  125. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +29 -14
  126. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py +29 -14
  127. diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py +1 -1
  128. diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py +1 -1
  129. diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py +16 -4
  130. diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py +15 -3
  131. diffusers/quantizers/__init__.py +16 -0
  132. diffusers/quantizers/auto.py +126 -0
  133. diffusers/quantizers/base.py +233 -0
  134. diffusers/quantizers/bitsandbytes/__init__.py +2 -0
  135. diffusers/quantizers/bitsandbytes/bnb_quantizer.py +558 -0
  136. diffusers/quantizers/bitsandbytes/utils.py +306 -0
  137. diffusers/quantizers/quantization_config.py +391 -0
  138. diffusers/schedulers/scheduling_ddim.py +4 -1
  139. diffusers/schedulers/scheduling_ddim_cogvideox.py +4 -1
  140. diffusers/schedulers/scheduling_ddim_parallel.py +4 -1
  141. diffusers/schedulers/scheduling_ddpm.py +4 -1
  142. diffusers/schedulers/scheduling_ddpm_parallel.py +4 -1
  143. diffusers/schedulers/scheduling_deis_multistep.py +78 -1
  144. diffusers/schedulers/scheduling_dpmsolver_multistep.py +82 -1
  145. diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +80 -1
  146. diffusers/schedulers/scheduling_dpmsolver_sde.py +125 -10
  147. diffusers/schedulers/scheduling_dpmsolver_singlestep.py +82 -1
  148. diffusers/schedulers/scheduling_edm_euler.py +8 -6
  149. diffusers/schedulers/scheduling_euler_ancestral_discrete.py +4 -1
  150. diffusers/schedulers/scheduling_euler_discrete.py +92 -7
  151. diffusers/schedulers/scheduling_flow_match_heun_discrete.py +4 -5
  152. diffusers/schedulers/scheduling_heun_discrete.py +114 -8
  153. diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py +116 -11
  154. diffusers/schedulers/scheduling_k_dpm_2_discrete.py +110 -8
  155. diffusers/schedulers/scheduling_lms_discrete.py +76 -1
  156. diffusers/schedulers/scheduling_sasolver.py +78 -1
  157. diffusers/schedulers/scheduling_unclip.py +4 -1
  158. diffusers/schedulers/scheduling_unipc_multistep.py +78 -1
  159. diffusers/training_utils.py +48 -18
  160. diffusers/utils/__init__.py +2 -1
  161. diffusers/utils/dummy_pt_objects.py +60 -0
  162. diffusers/utils/dummy_torch_and_transformers_objects.py +195 -0
  163. diffusers/utils/hub_utils.py +16 -4
  164. diffusers/utils/import_utils.py +31 -8
  165. diffusers/utils/loading_utils.py +28 -4
  166. diffusers/utils/peft_utils.py +3 -3
  167. diffusers/utils/testing_utils.py +59 -0
  168. {diffusers-0.30.2.dist-info → diffusers-0.31.0.dist-info}/METADATA +7 -6
  169. {diffusers-0.30.2.dist-info → diffusers-0.31.0.dist-info}/RECORD +173 -147
  170. {diffusers-0.30.2.dist-info → diffusers-0.31.0.dist-info}/WHEEL +1 -1
  171. {diffusers-0.30.2.dist-info → diffusers-0.31.0.dist-info}/LICENSE +0 -0
  172. {diffusers-0.30.2.dist-info → diffusers-0.31.0.dist-info}/entry_points.txt +0 -0
  173. {diffusers-0.30.2.dist-info → diffusers-0.31.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,233 @@
1
+ # Copyright 2024 The HuggingFace Inc. team. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Adapted from
17
+ https://github.com/huggingface/transformers/blob/52cb4034ada381fe1ffe8d428a1076e5411a8026/src/transformers/quantizers/base.py
18
+ """
19
+
20
+ from abc import ABC, abstractmethod
21
+ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
22
+
23
+ from ..utils import is_torch_available
24
+ from .quantization_config import QuantizationConfigMixin
25
+
26
+
27
+ if TYPE_CHECKING:
28
+ from ..models.modeling_utils import ModelMixin
29
+
30
+ if is_torch_available():
31
+ import torch
32
+
33
+
34
+ class DiffusersQuantizer(ABC):
35
+ """
36
+ Abstract class of the HuggingFace quantizer. Supports for now quantizing HF diffusers models for inference and/or
37
+ quantization. This class is used only for diffusers.models.modeling_utils.ModelMixin.from_pretrained and cannot be
38
+ easily used outside the scope of that method yet.
39
+
40
+ Attributes
41
+ quantization_config (`diffusers.quantizers.quantization_config.QuantizationConfigMixin`):
42
+ The quantization config that defines the quantization parameters of your model that you want to quantize.
43
+ modules_to_not_convert (`List[str]`, *optional*):
44
+ The list of module names to not convert when quantizing the model.
45
+ required_packages (`List[str]`, *optional*):
46
+ The list of required pip packages to install prior to using the quantizer
47
+ requires_calibration (`bool`):
48
+ Whether the quantization method requires to calibrate the model before using it.
49
+ """
50
+
51
+ requires_calibration = False
52
+ required_packages = None
53
+
54
+ def __init__(self, quantization_config: QuantizationConfigMixin, **kwargs):
55
+ self.quantization_config = quantization_config
56
+
57
+ # -- Handle extra kwargs below --
58
+ self.modules_to_not_convert = kwargs.pop("modules_to_not_convert", [])
59
+ self.pre_quantized = kwargs.pop("pre_quantized", True)
60
+
61
+ if not self.pre_quantized and self.requires_calibration:
62
+ raise ValueError(
63
+ f"The quantization method {quantization_config.quant_method} does require the model to be pre-quantized."
64
+ f" You explicitly passed `pre_quantized=False` meaning your model weights are not quantized. Make sure to "
65
+ f"pass `pre_quantized=True` while knowing what you are doing."
66
+ )
67
+
68
+ def update_torch_dtype(self, torch_dtype: "torch.dtype") -> "torch.dtype":
69
+ """
70
+ Some quantization methods require to explicitly set the dtype of the model to a target dtype. You need to
71
+ override this method in case you want to make sure that behavior is preserved
72
+
73
+ Args:
74
+ torch_dtype (`torch.dtype`):
75
+ The input dtype that is passed in `from_pretrained`
76
+ """
77
+ return torch_dtype
78
+
79
+ def update_device_map(self, device_map: Optional[Dict[str, Any]]) -> Optional[Dict[str, Any]]:
80
+ """
81
+ Override this method if you want to pass a override the existing device map with a new one. E.g. for
82
+ bitsandbytes, since `accelerate` is a hard requirement, if no device_map is passed, the device_map is set to
83
+ `"auto"``
84
+
85
+ Args:
86
+ device_map (`Union[dict, str]`, *optional*):
87
+ The device_map that is passed through the `from_pretrained` method.
88
+ """
89
+ return device_map
90
+
91
+ def adjust_target_dtype(self, torch_dtype: "torch.dtype") -> "torch.dtype":
92
+ """
93
+ Override this method if you want to adjust the `target_dtype` variable used in `from_pretrained` to compute the
94
+ device_map in case the device_map is a `str`. E.g. for bitsandbytes we force-set `target_dtype` to `torch.int8`
95
+ and for 4-bit we pass a custom enum `accelerate.CustomDtype.int4`.
96
+
97
+ Args:
98
+ torch_dtype (`torch.dtype`, *optional*):
99
+ The torch_dtype that is used to compute the device_map.
100
+ """
101
+ return torch_dtype
102
+
103
+ def update_missing_keys(self, model, missing_keys: List[str], prefix: str) -> List[str]:
104
+ """
105
+ Override this method if you want to adjust the `missing_keys`.
106
+
107
+ Args:
108
+ missing_keys (`List[str]`, *optional*):
109
+ The list of missing keys in the checkpoint compared to the state dict of the model
110
+ """
111
+ return missing_keys
112
+
113
+ def get_special_dtypes_update(self, model, torch_dtype: "torch.dtype") -> Dict[str, "torch.dtype"]:
114
+ """
115
+ returns dtypes for modules that are not quantized - used for the computation of the device_map in case one
116
+ passes a str as a device_map. The method will use the `modules_to_not_convert` that is modified in
117
+ `_process_model_before_weight_loading`. `diffusers` models don't have any `modules_to_not_convert` attributes
118
+ yet but this can change soon in the future.
119
+
120
+ Args:
121
+ model (`~diffusers.models.modeling_utils.ModelMixin`):
122
+ The model to quantize
123
+ torch_dtype (`torch.dtype`):
124
+ The dtype passed in `from_pretrained` method.
125
+ """
126
+
127
+ return {
128
+ name: torch_dtype
129
+ for name, _ in model.named_parameters()
130
+ if any(m in name for m in self.modules_to_not_convert)
131
+ }
132
+
133
+ def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) -> Dict[str, Union[int, str]]:
134
+ """adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization"""
135
+ return max_memory
136
+
137
+ def check_if_quantized_param(
138
+ self,
139
+ model: "ModelMixin",
140
+ param_value: "torch.Tensor",
141
+ param_name: str,
142
+ state_dict: Dict[str, Any],
143
+ **kwargs,
144
+ ) -> bool:
145
+ """
146
+ checks if a loaded state_dict component is part of quantized param + some validation; only defined for
147
+ quantization methods that require to create a new parameters for quantization.
148
+ """
149
+ return False
150
+
151
+ def create_quantized_param(self, *args, **kwargs) -> "torch.nn.Parameter":
152
+ """
153
+ takes needed components from state_dict and creates quantized param.
154
+ """
155
+ return
156
+
157
+ def check_quantized_param_shape(self, *args, **kwargs):
158
+ """
159
+ checks if the quantized param has expected shape.
160
+ """
161
+ return True
162
+
163
+ def validate_environment(self, *args, **kwargs):
164
+ """
165
+ This method is used to potentially check for potential conflicts with arguments that are passed in
166
+ `from_pretrained`. You need to define it for all future quantizers that are integrated with diffusers. If no
167
+ explicit check are needed, simply return nothing.
168
+ """
169
+ return
170
+
171
+ def preprocess_model(self, model: "ModelMixin", **kwargs):
172
+ """
173
+ Setting model attributes and/or converting model before weights loading. At this point the model should be
174
+ initialized on the meta device so you can freely manipulate the skeleton of the model in order to replace
175
+ modules in-place. Make sure to override the abstract method `_process_model_before_weight_loading`.
176
+
177
+ Args:
178
+ model (`~diffusers.models.modeling_utils.ModelMixin`):
179
+ The model to quantize
180
+ kwargs (`dict`, *optional*):
181
+ The keyword arguments that are passed along `_process_model_before_weight_loading`.
182
+ """
183
+ model.is_quantized = True
184
+ model.quantization_method = self.quantization_config.quant_method
185
+ return self._process_model_before_weight_loading(model, **kwargs)
186
+
187
+ def postprocess_model(self, model: "ModelMixin", **kwargs):
188
+ """
189
+ Post-process the model post weights loading. Make sure to override the abstract method
190
+ `_process_model_after_weight_loading`.
191
+
192
+ Args:
193
+ model (`~diffusers.models.modeling_utils.ModelMixin`):
194
+ The model to quantize
195
+ kwargs (`dict`, *optional*):
196
+ The keyword arguments that are passed along `_process_model_after_weight_loading`.
197
+ """
198
+ return self._process_model_after_weight_loading(model, **kwargs)
199
+
200
+ def dequantize(self, model):
201
+ """
202
+ Potentially dequantize the model to retrive the original model, with some loss in accuracy / performance. Note
203
+ not all quantization schemes support this.
204
+ """
205
+ model = self._dequantize(model)
206
+
207
+ # Delete quantizer and quantization config
208
+ del model.hf_quantizer
209
+
210
+ return model
211
+
212
+ def _dequantize(self, model):
213
+ raise NotImplementedError(
214
+ f"{self.quantization_config.quant_method} has no implementation of `dequantize`, please raise an issue on GitHub."
215
+ )
216
+
217
+ @abstractmethod
218
+ def _process_model_before_weight_loading(self, model, **kwargs):
219
+ ...
220
+
221
+ @abstractmethod
222
+ def _process_model_after_weight_loading(self, model, **kwargs):
223
+ ...
224
+
225
+ @property
226
+ @abstractmethod
227
+ def is_serializable(self):
228
+ ...
229
+
230
+ @property
231
+ @abstractmethod
232
+ def is_trainable(self):
233
+ ...
@@ -0,0 +1,2 @@
1
+ from .bnb_quantizer import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
2
+ from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear