diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-13 16:45:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-13 16:45:18 +0000 |
commit | d70c3a807b6904efe35c1eeb29997121a28143f2 (patch) | |
tree | c3f7be2284a9e212eaa731b4078172d3d9600e54 | |
parent | cdb1ffb2f4f088d8c1b1521930bde8b2d904b8a4 (diff) | |
parent | cb5f61281a95be72fc812b7d350b6ec23e2f9bdd (diff) | |
download | stable-diffusion-webui-gfx803-d70c3a807b6904efe35c1eeb29997121a28143f2.tar.gz stable-diffusion-webui-gfx803-d70c3a807b6904efe35c1eeb29997121a28143f2.tar.bz2 stable-diffusion-webui-gfx803-d70c3a807b6904efe35c1eeb29997121a28143f2.zip |
Merge pull request #10339 from catboxanon/bf16
Allow bf16 in safe unpickler
-rw-r--r-- | modules/safe.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/safe.py b/modules/safe.py index 1e791c5b..e8f50774 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)
|