transformers.js
transformers.js copied to clipboard
BROWSER_ENV var is true when running in bun
System Info
"@huggingface/transformers": "^3.0.0-alpha.14" "bun": 1.1.26
Environment/Platform
- [ ] Website/web-app
- [ ] Browser extension
- [X] Server-side (e.g., Node.js, Deno, Bun)
- [ ] Desktop app (e.g., Electron)
- [ ] Other (e.g., VSCode extension)
Description
I think this logic needs to change, since self
is defined in bun environment
https://github.com/xenova/transformers.js/blob/v3/src/utils/image.js#L18
Reproduction
Install @huggingface/transformers and try to run any model in bun runtime