Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading models from "non-URL" locations in the browser #991

Open
AKuederle opened this issue Oct 24, 2024 · 0 comments
Open

Loading models from "non-URL" locations in the browser #991

AKuederle opened this issue Oct 24, 2024 · 0 comments
Labels
question Further information is requested

Comments

@AKuederle
Copy link

AKuederle commented Oct 24, 2024

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!

@AKuederle AKuederle added the question Further information is requested label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant