Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pruna/engine/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ def load_pickled(path: str | Path, smash_config: SmashConfig, **kwargs) -> Any:
model = torch.load(
Path(path) / PICKLED_FILE_NAME,
weights_only=False,
map_location=target_device,
map_location="cpu",
**filter_load_kwargs(torch.load, kwargs),
)
# for cpu/cuda this will just continue as its on the correct device, for accelerate it will now distribute / cast
# move to target device, for accelerate it will now distribute / cast
move_to_device(model, target_device, device_map=smash_config.device_map)
return model

Expand Down