Skip to content

Commit

Permalink
fix save_original flag saving to the same filename (#360)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
wongjustin99 and greentext2 committed Sep 4, 2022
1 parent 6266d9e commit 5116c81
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ldm/simplet2i.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5116c81

Please sign in to comment.