Skip to content

Commit 36083e7

Browse files
authored
Apply suggestions from code review
1 parent b47fa05 commit 36083e7

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/diffusers/loaders/single_file_model.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ def from_single_file(cls, pretrained_model_link_or_path_or_dict: Optional[str] =
266266
f"Passed `torch_dtype` {torch_dtype} is not a `torch.dtype`. Defaulting to `torch.float32`."
267267
)
268268

269-
if quantization_config is not None and torch_dtype is not None:
270-
torch_dtype = None
271-
272269
if isinstance(pretrained_model_link_or_path_or_dict, dict):
273270
checkpoint = pretrained_model_link_or_path_or_dict
274271
else:

src/diffusers/models/modeling_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,6 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
889889
f"Passed `torch_dtype` {torch_dtype} is not a `torch.dtype`. Defaulting to `torch.float32`."
890890
)
891891

892-
if quantization_config is not None and torch_dtype is not None:
893-
torch_dtype = None
894-
895892
allow_pickle = False
896893
if use_safetensors is None:
897894
use_safetensors = True

0 commit comments

Comments
 (0)