potential crashfix, potential nothing
Browse files
app.py
CHANGED
@@ -23,9 +23,10 @@ def upscale_image(img: np.ndarray) -> np.ndarray:
|
|
23 |
output, _ = upsampler.enhance(img, outscale=4)
|
24 |
|
25 |
#cleanup
|
26 |
-
gc.collect()
|
27 |
torch.cuda.empty_cache()
|
28 |
del(upsampler)
|
|
|
|
|
29 |
return Image.fromarray(output)
|
30 |
|
31 |
with gr.Blocks() as demo:
|
|
|
23 |
output, _ = upsampler.enhance(img, outscale=4)
|
24 |
|
25 |
#cleanup
|
|
|
26 |
torch.cuda.empty_cache()
|
27 |
del(upsampler)
|
28 |
+
del(upscale_model)
|
29 |
+
gc.collect()
|
30 |
return Image.fromarray(output)
|
31 |
|
32 |
with gr.Blocks() as demo:
|