Run Fibo 2 image generation and editing on your own hardware with a self-hosted license. One license covers both generating and editing images. This guide installs the model, downloads its weights from Bria, and runs a first generation.
- An active Fibo 2 self-hosted license (pricing)
- One of your organization's API keys
- A machine with an NVIDIA GPU with 40 GB of memory, Python 3.11 or 3.12, and about 26 GB of disk for the weights
- For free-form prompts only: an LLM that expands them into a structured VGL prompt, on your own provider account. A VGL prompt needs no LLM (see LLM for free-form prompts)
- For the manual install:
curlandjq, and network access to the Bria Engine, AWS CodeArtifact and Bria's weights CDN (no Hugging Face account)
Buy a Fibo 2 license on the pricing page. You manage it, and see the installation steps, on the Licenses tab in the Console.
Bria Studio installs the package, downloads the weights, and runs a test for you:
npx @bria-ai/studioPick FIBO 2 when Studio lists your licensed models. It installs fibo_2 into a virtual environment at ~/.bria/venvs/fibo-2, downloads the weights, and runs a first generation to confirm the setup.
A structured VGL prompt needs no LLM. A free-form prompt, or an edit instruction, is first expanded into VGL by an LLM on your own account. Set FIBO_2_VGL_LLM to any model name litellm supports, and set that provider's credentials. If FIBO_2_VGL_LLM is not set, Fibo 2 uses Gemini: on AI Studio when GEMINI_API_KEY is set, otherwise on Vertex AI with your Vertex AI credentials.
# For example, Gemini on Vertex AI:
export VERTEXAI_PROJECT="<your-gcp-project>"
export VERTEXAI_LOCATION="<region>" # e.g. us-central1
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"If no LLM is set up, a request with a free-form prompt stops with a message that says what to set.
Run from the environment the model is installed in. If you used Studio, activate the venv it created:
source ~/.bria/venvs/fibo-2/bin/activateThen load the model with your API key and generate an image. On first load setup() checks your license and downloads the weights to ~/.bria/models; later runs reuse them.
import os
from fibo_2 import Fibo2Config, Fibo2Input, Fibo2Pipeline
# Reads BRIA_API_TOKEN; checks the license and downloads ~26 GB of weights on first load.
pipeline = Fibo2Pipeline(config=Fibo2Config(api_token=os.environ["BRIA_API_TOKEN"]))
pipeline.setup()
# Generate from a structured prompt (VGL): no LLM needed.
vgl = '{"short_description": "A red bicycle leaning against a white brick wall on a sunny morning", "style_medium": "photograph"}'
result = pipeline.execute(Fibo2Input(vgl=vgl, seed=42))
result.image.save("output.png")
# Generate from a free-form prompt: needs an LLM (see "LLM for free-form prompts").
# result = pipeline.execute(Fibo2Input(prompt="A red bicycle leaning against a white brick wall", seed=42))
# Edit: pass up to four images back in with an instruction (also needs an LLM).
# edited = pipeline.execute(Fibo2Input(images=[result.image], prompt="Make the bicycle blue", seed=42))Fibo2Input takes a vgl, or a free-form prompt that your LLM expands to VGL, plus optional images, style and seed. Inputs and outputs stay on your machine — only a small attribution vector is sent to Bria.
No license for FIBO 2
Your account holds no active Fibo 2 license, so the install stops before anything downloads. Buy or renew it on the Licenses tab.
LicenseError when the model starts
The license was cancelled or ended. Open the Licenses tab — the error links straight to it. A card retry (past_due) stays active.
The model won't load and asks for an API token
No BRIA_API_TOKEN is set. Set it, or pass Fibo2Config(api_token="...").
A free-form prompt stops and asks for an LLM
No LLM is set up for prompt expansion. Set FIBO_2_VGL_LLM and its provider's credentials, or GEMINI_API_KEY, or your Vertex AI credentials (see LLM for free-form prompts). Or send a vgl, which needs no LLM.
torch.cuda.is_available() is False during setup()
The installed PyTorch doesn't match your NVIDIA driver. pip's default PyTorch needs driver 580 or newer. Install the CUDA 12.8 build first, as in step 2.
WeightsError during download
The download was interrupted. Run again — it resumes where it stopped.
Self-hosted runs are counted against your Fibo 2 license and shown in Usage & billing in the Console, tagged as self-hosted. See Self-hosted models for how licensing and billing work across models.