diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-04-29 13:50:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 13:50:52 +0000 |
commit | 263f0fb59c7afa9b4739b226725dd0b38956a8cf (patch) | |
tree | 2ebe6b5e7763ab2c95aa8bd72ce6d8f6afbd87ce /modules/safe.py | |
parent | 082613036aa7b9a8a008384b1770046d6714bc28 (diff) | |
parent | faff08f396f159a5ddd6328a6d2699b7e7d18ef9 (diff) | |
download | stable-diffusion-webui-gfx803-263f0fb59c7afa9b4739b226725dd0b38956a8cf.tar.gz stable-diffusion-webui-gfx803-263f0fb59c7afa9b4739b226725dd0b38956a8cf.tar.bz2 stable-diffusion-webui-gfx803-263f0fb59c7afa9b4739b226725dd0b38956a8cf.zip |
Merge branch 'dev' into remove-watermark-option
Diffstat (limited to 'modules/safe.py')
-rw-r--r-- | modules/safe.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/safe.py b/modules/safe.py index 82d44be3..dadf319c 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -1,6 +1,5 @@ # this code is adapted from the script contributed by anon from /h/
-import io
import pickle
import collections
import sys
@@ -12,11 +11,9 @@ import _codecs import zipfile
import re
-
# PyTorch 1.13 and later have _TypedStorage renamed to TypedStorage
TypedStorage = torch.storage.TypedStorage if hasattr(torch.storage, 'TypedStorage') else torch.storage._TypedStorage
-
def encode(*args):
out = _codecs.encode(*args)
return out
@@ -27,7 +24,7 @@ class RestrictedUnpickler(pickle.Unpickler): def persistent_load(self, saved_id):
assert saved_id[0] == 'storage'
- return TypedStorage()
+ return TypedStorage(_internal=True)
def find_class(self, module, name):
if self.extra_handler is not None:
|