You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have an application where the model files will be pre-loaded in a custom format into the browsers IndexDb. Based on my understanding, transformer.js currently only supports loading models by URL and then caches them in the browser cache. Getting the model files from the IndexDb instead, seems a little tricky, as it would require to "copy" a lot of the loading logic.
Other ideas were to use a ServiceWorker to intercept the model download and mock the response with the files from IndexDb, or to write the files directly into browser cache that transformer.js uses.
Both solutions seem hacky... So, before I embark on writing my own loading logic, I wanted to ask, if you have any ideas or suggestions on how to approach this?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Question
Hi! I have an application where the model files will be pre-loaded in a custom format into the browsers IndexDb. Based on my understanding, transformer.js currently only supports loading models by URL and then caches them in the browser cache. Getting the model files from the IndexDb instead, seems a little tricky, as it would require to "copy" a lot of the loading logic.
Other ideas were to use a ServiceWorker to intercept the model download and mock the response with the files from IndexDb, or to write the files directly into browser cache that transformer.js uses.
Both solutions seem hacky... So, before I embark on writing my own loading logic, I wanted to ask, if you have any ideas or suggestions on how to approach this?
Thanks in advance!
The text was updated successfully, but these errors were encountered: