Skip to content

Commit 2f671af

Browse files
SunMarcsayakpaul
andauthored
Update src/diffusers/models/model_loading_utils.py
Co-authored-by: Sayak Paul <[email protected]>
1 parent 3bcd6cc commit 2f671af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/model_loading_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def load_state_dict(
163163
if disable_mmap:
164164
return safetensors.torch.load(open(checkpoint_file, "rb").read())
165165
else:
166-
return safetensors.torch.load_file(checkpoint_file, device="cpu")
166+
return safetensors.torch.load_file(checkpoint_file, device=map_location)
167167
elif file_extension == GGUF_FILE_EXTENSION:
168168
return load_gguf_checkpoint(checkpoint_file)
169169
else:

0 commit comments

Comments
 (0)