From 030b6a20b5f750c8f56299bd5f6ebe4b7ffcc308 Mon Sep 17 00:00:00 2001 From: Mokan Alexander <44652689+RuKapSan@users.noreply.github.com> Date: Fri, 10 May 2024 03:39:06 +0300 Subject: [PATCH] Update mask_nodes.py --- nodes/mask_nodes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nodes/mask_nodes.py b/nodes/mask_nodes.py index 4019dd0..ab89998 100644 --- a/nodes/mask_nodes.py +++ b/nodes/mask_nodes.py @@ -91,6 +91,9 @@ Segments an image or batch of images using CLIPSeg. if binary_mask: results = results.round() + del outputs, tensor, tensor_thresholded, tensor_normalized, resized_tensor, images + torch.cuda.empty_cache() + return results, class CreateTextMask: