Chrome MV3 서비스 워커에서 Transformers.js 파이프라인을 오프스크린 문서로 이동한 이유를 설명합니다.
이 글은 VectorTrace라는 오픈 소스 크롬 확장 프로그램 개발 중 발생한 문제에 대한 해결책을 기록합니다. 원래 계획은 Chrome MV3 백그라운드 서비스 워커에서 Transformers.js 임베딩 파이프라인을 직접 실행하는 것이었습니다. 그러나 Chrome의 MV3 서비스 워커가 비활성화 시 임시로 종료되면서 파이프라인이 제거되는 문제에 직면하게 되었습니다. 따라서 이 문제를 해결하기 위해 오프스크린 문서로 파이프라인을 이동하는 방법을 소개합니다.
Discusses why the Transformers.js pipeline was moved from Chrome MV3 service worker to an Offscreen Document.
This article records the solution to a problem encountered while developing an open-source Chrome extension called VectorTrace. The original plan was to run the Transformers.js embedding pipeline directly in the Chrome MV3 background service worker. However, the Chrome MV3 service worker can suspend and terminate at any time, leading to the loss of the in-memory pipeline. To address this issue, the author explains the transition of the pipeline to an Offscreen Document.