fixed memory leak related to video files

This commit is contained in:
2026-03-29 13:31:27 +02:00
parent 5662f079eb
commit 4cdccb7227
8 changed files with 36 additions and 22 deletions

View File

@@ -59,6 +59,10 @@ class WDClassifier():
return "", {}, {}
async def classify_async(self, image_bytes, max_count = -1, tag_threshold = -1):
if not image_bytes:
#mainly for video files
print("image bytes was null")
return "", {}, {}
with ThreadPoolExecutor() as executor:
future = executor.submit(self.classify, image_bytes, max_count, tag_threshold)