Fix metadata
The model isn't compatible with Transformers.js because it doesn't have ONNX weights.
Hi, Joshua, I have the ONNX files (BiRefNet-general-epoch_244.onnx for this model repo) in my GitHub repo's release page.
I'm very glad to improve the compatibility for it. What should I do? Thanks a lot for the clues!
Besides, if the ONNX files are added, will it enlarge the size of downloading content?
Thanks! I have made a duplicate repo which has the correct files here: https://huggingface.co/onnx-community/BiRefNet-ONNX
Pretty much the two things you need to do is:
- Copy the onnx subfolder from the repository to yours
- Update the config.json to include the key:
"model_type": "birefnet"
Hi,
@Xenova
, very sorry for the late reply, got too many things recently.
But ONNX files are also large (tend to be a bit larger than the original weights file), will the modification cause much burden for the user to download?
No worries! Here I also am responding late π
Right, so in order to not bloat the original repo, it's probably best to:
- Update the metadata to remove the transformers.js tag. This is because we need the ONNX weights in the repo (in the onnx subfolder) for it to be compatible with transformers.js
- Optionally, add a link to the ONNX/Transformers.js-compatible version here: https://huggingface.co/onnx-community/BiRefNet-ONNX
Hope that sounds good!
Thanks!
I wanted to add ONNX files here and avoid too large downloads when not necessary for the users, which, though, seems not very applicable.
I'm going to remove the tag here and provide the link to that repo on ONNX-community.