Skip to content
Last updated

Self-hosting quickstart

One command installs a licensed model on your GPU and runs it:

npx @bria-ai/studio

Studio signs you in through your browser, installs the model you pick into a virtual environment at ~/.bria/venvs/<model>, downloads its weights, and runs a first generation.

Before you run it

You need Node.js, an NVIDIA GPU, and a model license. No license yet? See pricing and Self-hosted models.

Use the model

The model's package stays installed in that virtual environment. Activate it and call the model from your own code:

source ~/.bria/venvs/rmbg-2.0/bin/activate
from remove_bg import RemoveBG, RemoveBGConfig, RemoveBGInput

pipe = RemoveBG(config=RemoveBGConfig(api_token="<your-bria-api-token>"))
pipe.setup()  # reuses the weights Studio already downloaded
pipe.execute([RemoveBGInput(image="input.jpg")])[0].image.save("cutout.png")

Next steps