The model is now added to WebAI.js. Try it in your browser with no code required.
#3
by
AxolsWebAI
- opened
Hi there,
We've packaged this model inside our open-source library WebAI.js, so you can now integrate it into your project with just a few lines of code:
import { WebAI } from '@axols/webai-js';
const webai = await WebAI.create({
modelId: "rmbg-ben2"
});
await webai.init({
mode: "webai",
precision: "fp16",
device: "webgpu"
});
const generation = await webai.generate({
userInput: {
image_blob_url: "blob:https://www.webai-js.com/1ba817d0-90f2-4572-afea-1a0c59b6d187"
},
modelConfig: {},
generateConfig: {}
});
π¬ Try BEN2 Background Remover Instantly (No Code Required)
You can benchmark and test the model directly here:
https://www.webai-js.com/models/rmbg-ben2/playground
π Full API Reference
Detailed parameter explanations can be found here:
https://www.webai-js.com/models/rmbg-ben2/api-reference/v1/class-api/methods/webai-generate
π§‘ Fully Open Source
WebAI.js is completely open source and free to use.
Star or contribute on GitHub:
https://github.com/axolsai/webai-js
Thanks

