diff --git a/backgroundremover/u2net/detect.py b/backgroundremover/u2net/detect.py index d0246b2..cda5184 100644 --- a/backgroundremover/u2net/detect.py +++ b/backgroundremover/u2net/detect.py @@ -151,6 +151,5 @@ def predict(net, item): img = Image.fromarray(predict_np * 255).convert("RGB") del d1, d2, d3, d4, d5, d6, d7, pred, predict, predict_np, inputs_test, sample - torch.cuda.empty_cache() if torch.cuda.is_available() else None return img