forked from sczhou/CodeFormer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable realesrgan in CPU (sczhou#40)
- Loading branch information
Showing
3 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,7 +193,7 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide | |
imwrite(restored_img, str(save_path)) | ||
|
||
restored_img = cv2.cvtColor(restored_img, cv2.COLOR_BGR2RGB) | ||
return restored_img | ||
return restored_img, save_path | ||
|
||
|
||
|
||
|
@@ -230,7 +230,7 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide | |
If you have any questions, please feel free to reach me out at <b>[email protected]</b>. | ||
![visitors](https://visitor-badge.glitch.me/badge?page_id=sczhou/CodeFormer) | ||
![visitors](https://visitor-badge.laobi.icu/badge?page_id=sczhou/CodeFormer) | ||
""" | ||
|
||
demo = gr.Interface( | ||
|
@@ -242,6 +242,7 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide | |
gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity: 0 for better quality, 1 for better identity') | ||
], [ | ||
gr.outputs.Image(type="numpy", label="Output"), | ||
gr.outputs.File(label="Download the output") | ||
], | ||
title=title, | ||
description=description, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters