Skip to content

Commit 3298a04

Browse files
committed
fix
1 parent 1af10a8 commit 3298a04

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/diffusers/quantizers/base.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,12 @@ def create_quantized_param(self, *args, **kwargs) -> "torch.nn.Parameter":
152152
"""
153153
takes needed components from state_dict and creates quantized param.
154154
"""
155-
if not hasattr(self, "check_if_quantized_param"):
156-
raise AttributeError(
157-
f"`.create_quantized_param()` method is not supported by quantizer class {self.__class__.__name__}."
158-
)
155+
return
159156

160157
def check_quantized_param_shape(self, *args, **kwargs):
161158
"""
162159
checks if the quantized param has expected shape.
163160
"""
164-
if not hasattr(self, "check_quantized_param_shape"):
165-
raise AttributeError(
166-
f"`.check_quantized_param_shape()` method is not supported by quantizer class {self.__class__.__name__}."
167-
)
168161
return True
169162

170163
def validate_environment(self, *args, **kwargs):

0 commit comments

Comments
 (0)