diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-09 19:42:37 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-09 19:42:37 +0000 |
commit | c8791c1d37502f162b8616b066303bfadc4a749b (patch) | |
tree | 6843c3505117f26549dfe1dc9cd40aacd5ccdfd3 /modules/safe.py | |
parent | 6fbd85dd0c0dffc06560bff91f4c4b65e441ca5f (diff) | |
parent | 31397986e70d20e392d9c3ec70d3aef8ecc2c1ff (diff) | |
download | stable-diffusion-webui-gfx803-c8791c1d37502f162b8616b066303bfadc4a749b.tar.gz stable-diffusion-webui-gfx803-c8791c1d37502f162b8616b066303bfadc4a749b.tar.bz2 stable-diffusion-webui-gfx803-c8791c1d37502f162b8616b066303bfadc4a749b.zip |
Merge branch 'dev' into release_candidate
Diffstat (limited to 'modules/safe.py')
-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:
|