From 5116c8178c67f550e57f5d16fe931ee1a7cdb0ba Mon Sep 17 00:00:00 2001 From: Justin Wong <1584142+wongjustin99@users.noreply.github.com> Date: Sun, 4 Sep 2022 07:17:58 -0400 Subject: [PATCH] fix save_original flag saving to the same filename (#360) * Update README.md with new Anaconda install steps (#347) pip3 version did not work for me and this is the recommended way to install Anaconda now it seems * fix save_original flag saving to the same filename Before this, the `--save_orig` flag was not working. The upscaled/GFPGAN would overwrite the original output image. Co-authored-by: greentext2 <112735219+greentext2@users.noreply.github.com> --- ldm/simplet2i.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ldm/simplet2i.py b/ldm/simplet2i.py index 07f34cfed3e..fe96868508b 100644 --- a/ldm/simplet2i.py +++ b/ldm/simplet2i.py @@ -422,10 +422,7 @@ def process_image(image,seed): f'>> Error running RealESRGAN - Your image was not upscaled.\n{e}' ) if image_callback is not None: - if save_original: - image_callback(image, seed) - else: - image_callback(image, seed, upscaled=True) + image_callback(image, seed, upscaled=True) else: # no callback passed, so we simply replace old image with rescaled one result[0] = image