John Smith
commited on
Commit
·
9004c3c
1
Parent(s):
e4d65b2
Update app.py
Browse files
app.py
CHANGED
@@ -99,10 +99,10 @@ def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
|
|
99 |
print('If you encounter CUDA out of memory, try to set --tile with a smaller number.')
|
100 |
else:
|
101 |
# Save restored image and return it to the output Image component
|
102 |
-
if img_mode == 'RGBA': # RGBA images should be saved in png format
|
103 |
extension = 'png'
|
104 |
-
else:
|
105 |
-
|
106 |
|
107 |
out_filename = f"output_{rnd_string(8)}.{extension}"
|
108 |
cv2.imwrite(out_filename, output)
|
|
|
99 |
print('If you encounter CUDA out of memory, try to set --tile with a smaller number.')
|
100 |
else:
|
101 |
# Save restored image and return it to the output Image component
|
102 |
+
#if img_mode == 'RGBA': # RGBA images should be saved in png format
|
103 |
extension = 'png'
|
104 |
+
#else:
|
105 |
+
# extension = 'jpg'
|
106 |
|
107 |
out_filename = f"output_{rnd_string(8)}.{extension}"
|
108 |
cv2.imwrite(out_filename, output)
|