Unbundled js?
Hello, thanks for the space, it is really cool! Are there plans to publish the unbundled js files so I can learn and build on top of this?
+1
Yes please, and with a license file as well (because the bundled licenses may be misleading to someone quickly looking through the files) ❤️
Oh I didn't know so many people were interested! Thanks for the bump @borisAbrega .
The source code is the same as the original version: https://github.com/xenova/transformers.js/tree/main/examples/remove-background-client,
with the following modification:
const model = await AutoModel.from_pretrained('briaai/RMBG-1.4', {
// Do not require config.json to be present in the repository
config: { model_type: 'custom' },
});
becomes
const model = await AutoModel.from_pretrained('briaai/RMBG-1.4', {
// Do not require config.json to be present in the repository
config: { model_type: 'custom' },
device: 'webgpu',
dtype: 'fp32',
});
Of course, you need to install the v3 branch to enable WebGPU support.
You seem to have removed the line for config
Hmm, interesting. Can you let me know which line of code (in transformers.js) this error occurs at?
Nevermind, I was able to reproduce this. Will fix!