Skip to content

Commit

Permalink
Update for loading MetaTensor
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Kerfoot <[email protected]>
  • Loading branch information
ericspod committed Jan 29, 2025
1 parent d6152a3 commit 7c5bb69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion monai/data/meta_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,4 +609,5 @@ def print_verbose(self) -> None:
print(self.meta.__repr__())


torch.serialization.add_safe_globals([MetaTensor])
if hasattr(torch.serialization,"add_safe_globals"):
torch.serialization.add_safe_globals([MetaTensor])

0 comments on commit 7c5bb69

Please sign in to comment.