mediapipe adds <script>s to the DOM each time a task runner is created
Author: tzaholaCreated Oct 24, 2024Updated Sep 30, 2026
Labelstype:supportplatform:javascriptstat:awaiting googlertask:image segmentation
Every time you create e.g. an ImageSegmenter with ImageSegmenter.createWithOptions({wasmBinaryPath: ..., wasmLoaderPath: ...}) a <script> element is added to the document with wasmLoaderPath. If you later create a new instance, then another <script> is appended to the DOM. Every single time.
It would be nice if mediapipe only added a <script> to the DOM if the script in question wasn't loaded previously, thus preventing apps from accumulating many redundant nodes in their DOM.
Source: google-ai-edge/mediapipe