Simplify a bunch of len(x) > 0/len(x) == 0 style expressions

This commit is contained in:
Aarni Koskela
2023-06-02 14:58:10 +03:00
parent 3e995778fc
commit 51864790fd
25 changed files with 47 additions and 48 deletions

View File

@@ -21,8 +21,7 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):
is_inpaint_batch = False
if inpaint_mask_dir:
inpaint_masks = shared.listfiles(inpaint_mask_dir)
is_inpaint_batch = len(inpaint_masks) > 0
if is_inpaint_batch:
is_inpaint_batch = bool(inpaint_masks)
print(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.")
print(f"Will process {len(images)} images, creating {p.n_iter * p.batch_size} new images for each.")