|
|
@ -95,7 +95,8 @@ def imagine_image_files(
|
|
|
|
):
|
|
|
|
):
|
|
|
|
big_path = os.path.join(outdir, "upscaled")
|
|
|
|
big_path = os.path.join(outdir, "upscaled")
|
|
|
|
masked_orig_path = os.path.join(outdir, "modified_originals")
|
|
|
|
masked_orig_path = os.path.join(outdir, "modified_originals")
|
|
|
|
os.makedirs(outdir, exist_ok=True)
|
|
|
|
generated_imgs_path = os.path.join(outdir, "generated")
|
|
|
|
|
|
|
|
os.makedirs(generated_imgs_path, exist_ok=True)
|
|
|
|
|
|
|
|
|
|
|
|
base_count = len(os.listdir(outdir))
|
|
|
|
base_count = len(os.listdir(outdir))
|
|
|
|
output_file_extension = output_file_extension.lower()
|
|
|
|
output_file_extension = output_file_extension.lower()
|
|
|
@ -124,8 +125,7 @@ def imagine_image_files(
|
|
|
|
):
|
|
|
|
):
|
|
|
|
prompt = result.prompt
|
|
|
|
prompt = result.prompt
|
|
|
|
basefilename = f"{base_count:06}_{prompt.seed}_{prompt.sampler_type}{prompt.steps}_PS{prompt.prompt_strength}_{prompt_normalized(prompt.prompt_text)}"
|
|
|
|
basefilename = f"{base_count:06}_{prompt.seed}_{prompt.sampler_type}{prompt.steps}_PS{prompt.prompt_strength}_{prompt_normalized(prompt.prompt_text)}"
|
|
|
|
filepath = os.path.join(outdir, "generated", f"{basefilename}.jpg")
|
|
|
|
filepath = os.path.join(generated_imgs_path, f"{basefilename}.jpg")
|
|
|
|
os.makedirs(filepath, exist_ok=True)
|
|
|
|
|
|
|
|
result.save(filepath)
|
|
|
|
result.save(filepath)
|
|
|
|
logger.info(f" 🖼 saved to: {filepath}")
|
|
|
|
logger.info(f" 🖼 saved to: {filepath}")
|
|
|
|
if result.upscaled_img:
|
|
|
|
if result.upscaled_img:
|
|
|
|