Cropinky commited on
Commit
fc85a8a
1 Parent(s): 68ed9da

potential crashfix, potential nothing

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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: