make save dir if save dir is not exists

This commit is contained in:
k_sugawara 2022-11-01 09:40:54 +09:00
parent 5c9b3625fa
commit 525c1edf43
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ def process_batch(p, input_dir, output_dir, args):
filename = f"{left}-{n}{right}" filename = f"{left}-{n}{right}"
if not save_normally: if not save_normally:
os.makedirs(output_dir, exist_ok=True)
processed_image.save(os.path.join(output_dir, filename)) processed_image.save(os.path.join(output_dir, filename))