diff options
author | Roman Beltiukov <maybe.hello.world@gmail.com> | 2023-05-25 22:10:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 22:10:10 +0000 |
commit | b2530c965c2afd5512c5f9020251fd4be8f067e5 (patch) | |
tree | 0c1620e00ac4eddea514706a5c3bf3e03bd46c70 /modules/safe.py | |
parent | 09d9c3d287ee4543d285e0fde8b81603c9751a7e (diff) | |
parent | a6e653be26cc05f4438145fa0082816e9fbbf5fc (diff) | |
download | stable-diffusion-webui-gfx803-b2530c965c2afd5512c5f9020251fd4be8f067e5.tar.gz stable-diffusion-webui-gfx803-b2530c965c2afd5512c5f9020251fd4be8f067e5.tar.bz2 stable-diffusion-webui-gfx803-b2530c965c2afd5512c5f9020251fd4be8f067e5.zip |
Merge branch 'dev' into master
Diffstat (limited to 'modules/safe.py')
-rw-r--r-- | modules/safe.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/safe.py b/modules/safe.py index e1a67f73..e8f50774 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -95,16 +95,16 @@ def check_pt(filename, extra_handler): except zipfile.BadZipfile:
- # if it's not a zip file, it's an olf pytorch format, with five objects written to pickle
+ # if it's not a zip file, it's an old pytorch format, with five objects written to pickle
with open(filename, "rb") as file:
unpickler = RestrictedUnpickler(file)
unpickler.extra_handler = extra_handler
- for i in range(5):
+ for _ in range(5):
unpickler.load()
def load(filename, *args, **kwargs):
- return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs)
+ return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)
def load_with_extra(filename, extra_handler=None, *args, **kwargs):
|