Skip to content

Commit

Permalink
Revert "add cuda empty cache to properly release cuda memory"
Browse files Browse the repository at this point in the history
This reverts commit c78e8f1.
  • Loading branch information
Isalia20 committed Apr 19, 2024
1 parent c78e8f1 commit 4ba6485
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion backgroundremover/u2net/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4ba6485

Please sign in to comment.