aboutsummaryrefslogtreecommitdiff
path: root/modules/safe.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-10-09 23:38:49 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-10-09 23:38:49 +0300
commita65476718f08a35f527b973ef731e6f488bace5e (patch)
treecd351a4ce3cb0ed4aa2a7792a5e3b5871856c6a5 /modules/safe.py
parent8d340cfb884e1dbff5b6f477f4ecf7d104279115 (diff)
add DoubleStorage to list of allowed classes for pickle
Diffstat (limited to 'modules/safe.py')
-rw-r--r--modules/safe.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/safe.py b/modules/safe.py
index 2d2c1371..4d06f2a5 100644
--- a/modules/safe.py
+++ b/modules/safe.py
@@ -27,7 +27,7 @@ class RestrictedUnpickler(pickle.Unpickler):
return getattr(collections, name)
if module == 'torch._utils' and name in ['_rebuild_tensor_v2', '_rebuild_parameter']:
return getattr(torch._utils, name)
- if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage']:
+ if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage']:
return getattr(torch, name)
if module == 'torch.nn.modules.container' and name in ['ParameterDict']:
return getattr(torch.nn.modules.container, name)