diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-02 06:25:47 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-02 06:25:47 +0000 |
commit | 4499bead4c1a20cac94f5411f7ba343f663bd415 (patch) | |
tree | 17e3b11d8d930787c575a9dd11759e95a2aa6a6f /modules | |
parent | b1717c0a4804f8ed3bb8cc2f3aea5d095778b447 (diff) | |
parent | 5ab7f213bec2f816f9c5644becb32eb72c8ffb89 (diff) | |
download | stable-diffusion-webui-gfx803-4499bead4c1a20cac94f5411f7ba343f663bd415.tar.gz stable-diffusion-webui-gfx803-4499bead4c1a20cac94f5411f7ba343f663bd415.tar.bz2 stable-diffusion-webui-gfx803-4499bead4c1a20cac94f5411f7ba343f663bd415.zip |
Merge branch 'master' into dev
Diffstat (limited to 'modules')
-rw-r--r-- | modules/safe.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/safe.py b/modules/safe.py index dadf319c..e6c2f2c0 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -24,7 +24,11 @@ class RestrictedUnpickler(pickle.Unpickler): def persistent_load(self, saved_id):
assert saved_id[0] == 'storage'
- return TypedStorage(_internal=True)
+
+ try:
+ return TypedStorage(_internal=True)
+ except TypeError:
+ return TypedStorage() # PyTorch before 2.0 does not have the _internal argument
def find_class(self, module, name):
if self.extra_handler is not None:
|