Spaces:
Running
on
L4
Running
on
L4
reboot.
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide
|
|
159 |
restored_face = tensor2img(output, rgb2bgr=True, min_max=(-1, 1))
|
160 |
del output
|
161 |
torch.cuda.empty_cache()
|
162 |
-
except
|
163 |
print(f"\tFailed inference for CodeFormer: {error}")
|
164 |
restored_face = tensor2img(
|
165 |
cropped_face_t, rgb2bgr=True, min_max=(-1, 1)
|
@@ -257,7 +257,7 @@ demo = gr.Interface(
|
|
257 |
['04.jpg', True, True, 2, 0.1],
|
258 |
['05.jpg', True, True, 2, 0.1]
|
259 |
]
|
260 |
-
)
|
261 |
|
262 |
-
demo.queue(concurrency_count=
|
263 |
demo.launch()
|
|
|
159 |
restored_face = tensor2img(output, rgb2bgr=True, min_max=(-1, 1))
|
160 |
del output
|
161 |
torch.cuda.empty_cache()
|
162 |
+
except RuntimeError as error:
|
163 |
print(f"\tFailed inference for CodeFormer: {error}")
|
164 |
restored_face = tensor2img(
|
165 |
cropped_face_t, rgb2bgr=True, min_max=(-1, 1)
|
|
|
257 |
['04.jpg', True, True, 2, 0.1],
|
258 |
['05.jpg', True, True, 2, 0.1]
|
259 |
]
|
260 |
+
)
|
261 |
|
262 |
+
demo.queue(concurrency_count=4)
|
263 |
demo.launch()
|