aboutsummaryrefslogtreecommitdiff
path: root/modules/safe.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-13 20:25:03 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-13 20:25:03 +0300
commit2053745c8fc29a0d3c1bbfa07858fb0b21b32e6d (patch)
tree8a80f841fc4a5d588e1214111990aca7472a8cc1 /modules/safe.py
parent231562ea13e4f697953bdbabd6b76b22a88c587b (diff)
parent27f7fbf35cd72d547d830f97828ee13d3d2009aa (diff)
Merge branch 'v1.2.0-hotfix' into release_candidate
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 e6c2f2c0..e1a67f73 100644
--- a/modules/safe.py
+++ b/modules/safe.py
@@ -40,7 +40,7 @@ class RestrictedUnpickler(pickle.Unpickler):
return getattr(collections, name)
if module == 'torch._utils' and name in ['_rebuild_tensor_v2', '_rebuild_parameter', '_rebuild_device_tensor_from_numpy']:
return getattr(torch._utils, name)
- if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage', 'ByteStorage', 'float32']:
+ if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage', 'ByteStorage', 'float32', 'BFloat16Storage']:
return getattr(torch, name)
if module == 'torch.nn.modules.container' and name in ['ParameterDict']:
return getattr(torch.nn.modules.container, name)