Skip to content

Commit

Permalink
Update upscaler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyondo committed Dec 31, 2022
1 parent ccace43 commit 04ba2c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def realesrgan(image, scale):
image.save(os.path.join(input_dir, "image.png"))
IPython.get_ipython().system("python vendor/Real-ESRGAN/inference_realesrgan.py -i %s -o %s -s %s &> /dev/null" % (input_dir, output_dir, scale))
try:
image = PIL.Image.open(os.path.join(output_dir, "restored_imgs", "image.png"))
image = PIL.Image.open(os.path.join(output_dir, "image_out.png"))
except Exception as e: print("Scaling failed: %s" % e)
return image
def esrgan(image, scale):
Expand Down

0 comments on commit 04ba2c6

Please sign in to comment.