aboutsummaryrefslogtreecommitdiffstats
path: root/modules/safe.py
diff options
context:
space:
mode:
authorRoman Beltiukov <maybe.hello.world@gmail.com>2023-05-25 22:10:10 +0000
committerGitHub <noreply@github.com>2023-05-25 22:10:10 +0000
commitb2530c965c2afd5512c5f9020251fd4be8f067e5 (patch)
tree0c1620e00ac4eddea514706a5c3bf3e03bd46c70 /modules/safe.py
parent09d9c3d287ee4543d285e0fde8b81603c9751a7e (diff)
parenta6e653be26cc05f4438145fa0082816e9fbbf5fc (diff)
downloadstable-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.py6
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):