|
|
|
|
@ -55,7 +55,7 @@ class LruCache(OrderedDict):
|
|
|
|
|
cached_images: LruCache = LruCache(max_size=5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_dir, show_extras_results, gfpgan_visibility, codeformer_visibility, codeformer_weight, upscaling_resize, upscaling_resize_w, upscaling_resize_h, upscaling_crop, extras_upscaler_1, extras_upscaler_2, extras_upscaler_2_visibility, upscale_first: bool):
|
|
|
|
|
def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_dir, show_extras_results, gfpgan_visibility, codeformer_visibility, codeformer_weight, upscaling_resize, upscaling_resize_w, upscaling_resize_h, upscaling_crop, extras_upscaler_1, extras_upscaler_2, extras_upscaler_2_visibility, upscale_first: bool, save_output: bool = True):
|
|
|
|
|
devices.torch_gc()
|
|
|
|
|
|
|
|
|
|
imageArr = []
|
|
|
|
|
@ -193,6 +193,7 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
|
|
|
|
|
else:
|
|
|
|
|
basename = ''
|
|
|
|
|
|
|
|
|
|
if save_output:
|
|
|
|
|
# Add upscaler name as a suffix.
|
|
|
|
|
suffix = f"-{shared.sd_upscalers[extras_upscaler_1].name}" if shared.opts.use_upscaler_name_as_suffix else ""
|
|
|
|
|
# Add second upscaler if applicable.
|
|
|
|
|
|