ruff updates

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-12-20 18:58:29 -05:00
parent ed3e5f06d6
commit fc8a18df36
11 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ class Script(scripts.Script):
# set params
image = getattr(p, 'init_images', None)
image = None if image is None or len(image) == 0 else image[0]
if p.width == 0 or p.height == 0 and image is not None:
if (p.width == 0 or p.height == 0) and image is not None:
p.width = image.width
p.height = image.height
num_frames = 8 * int(num_frames // 8) + 1
+1 -1
View File
@@ -9,7 +9,7 @@ from modules import shared, devices, scripts, processing, sd_models, prompt_pars
def hijack_register_modules(self, **kwargs):
for name, module in kwargs.items():
register_dict = None
if module is None or isinstance(module, (tuple, list)) and module[0] is None:
if module is None or (isinstance(module, (tuple, list)) and module[0] is None):
register_dict = {name: (None, None)}
elif isinstance(module, bool):
pass