Skip to content

Commit 5129688

Browse files
fix MutableTorchTensorRTModule load issue (#3281)
1 parent eb6d410 commit 5129688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/torch_tensorrt/dynamo/runtime/_MutableTorchTensorRTModule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def save(module: Any, path: str) -> None:
498498
def load(path: str) -> Any:
499499
# When the model get saved, init_finished is set to False.
500500
# Class is restored to MutableTorchTensorRTModule, and some attribute is deleted
501-
module = torch.load(path)
501+
module = torch.load(path, weights_only=False)
502502
module.pytorch_model = _make_refit_change_trigger(
503503
module.original_model, module.refit_state
504504
)

0 commit comments

Comments
 (0)