Skip to content

Commit b136d23

Browse files
committed
update
1 parent 9e5a3d0 commit b136d23

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/diffusers/quantizers/quanto/quanto_quantizer.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,8 @@ def adjust_target_dtype(self, target_dtype: "torch.dtype") -> "torch.dtype":
103103
"int2": CustomDtype.INT2,
104104
}
105105
target_dtype = mapping[self.quantization_config.weights]
106-
return target_dtype
107-
else:
108-
raise ValueError(
109-
"You are using `device_map='auto'` on an optimum-quanto quantized model. To automatically compute"
110-
" the appropriate device map, you should upgrade your `accelerate` library,"
111-
"`pip install --upgrade accelerate` or install it from source."
112-
)
106+
107+
return target_dtype
113108

114109
def update_torch_dtype(self, torch_dtype: "torch.dtype" = None) -> "torch.dtype":
115110
if torch_dtype is None:

0 commit comments

Comments
 (0)