From bf46a9d6c1c2f46390cb0ac91c6b3188d562fa60 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 13 Dec 2024 22:59:53 +0100 Subject: [PATCH] Close the image segmenter result. This doesn't currently do anything useful, since we're running tflite on the CPU, but might avoid bugs if we get GPU support. --- static/background-blur-worker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/background-blur-worker.js b/static/background-blur-worker.js index c5bea55..5c7ff75 100644 --- a/static/background-blur-worker.js +++ b/static/background-blur-worker.js @@ -47,6 +47,7 @@ onmessage = e => { let id = new ImageData(width, height); for(let i = 0; i < mask.length; i++) id.data[4 * i + 3] = mask[i]; + result.close(); createImageBitmap(id).then(ib => { postMessage({ bitmap: bitmap,