We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7261559 commit 126d84eCopy full SHA for 126d84e
src/diffusers/models/model_loading_utils.py
@@ -176,6 +176,8 @@ def load_model_dict_into_meta(
176
hf_quantizer=None,
177
keep_in_fp32_modules=None,
178
) -> List[str]:
179
+ if device is not None and not isinstance(device, (str, torch.device)):
180
+ raise ValueError(f"Expected device to have type `str` or `torch.device`, but got {type(device)=}.")
181
if hf_quantizer is None:
182
device = device or torch.device("cpu")
183
dtype = dtype or torch.float32
0 commit comments