Fibo 2.0 Edit Turbo OrbitQuant W4A8

OrbitQuant 4-bit weights for Fibo 2.0 Edit Turbo, the 4-step distilled image-editing model of BRIA AI that reads structured JSON captions (VGL). The transformer and the language model of the Qwen3-VL-4B text encoder both run 8-bit activations over 4-bit weights. The 4-bit codes were chosen with GPTQ rounding against calibration captions that are not in the evaluation set. The runtime is the original BriaFibo2Pipeline of Diffusers (4 steps, no guidance) and the ComfyUI-OrbitQuant nodes. The bundle is 8.1 GB. The original is 25.5 GB.

On one RTX 5090 a 4-step edit of a 1216×830 photo (1264×864 output) takes 2.45 s with 11.0 GiB of device memory at the peak; the original in BF16 takes 4.77 s and 27.7 GiB. With --offload the peak is 6.5 GiB and it takes 4.41 s. The Performance section has the details.

Generation time, device memory peak and checkpoint size: BF16 original and OrbitQuant W4A8 on one RTX 5090

Usage

Use Linux, Python 3.12 and an NVIDIA GPU with compute capability 8.0 or newer. The tested stack is Torch 2.12.1 with CUDA 13.0 on an RTX 5090.

python3.12 -m venv .venv && . .venv/bin/activate
pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cu130
pip install huggingface_hub
hf download WaveCut/Fibo-2.0-edit-turbo-OrbitQuant-W4A8 --local-dir fibo2-turbo-orbitquant
cd fibo2-turbo-orbitquant
pip install -r requirements.txt

Fibo 2.0 reads a structured VGL caption: a JSON object with short_description, objects, background_setting, lighting, aesthetics, photographic_characteristics, style_medium and, for text in the image, text_render. bria-vgl writes such captions from plain language, and the caption guide of the original describes every field. Plain text also runs, with weaker results.

Edit: write the caption of the result with an edit_instruction and pass the images (up to 4) and an optional mask. bria-vgl's modify() writes this caption from the images and a plain instruction:

python run_fibo2.py --prompt edit.json --image photo.jpg --out edited.png
python run_fibo2.py --prompt edit.json --image photo.jpg --mask mask.png --out edited.png

Python, inside fibo2-turbo-orbitquant:

import json
import torch
from PIL import Image
from fibo2_orbitquant import fonts, load_pipeline

pipe = load_pipeline(".")
caption = json.load(open("edit.json"))
edited = pipe(prompt=json.dumps(caption), image=Image.open("photo.jpg").convert("RGB"),
              num_inference_steps=4, guidance_scale=1.0, fonts=fonts("."),
              generator=torch.Generator("cpu").manual_seed(42)).images[0]
edited.save("edited.png")

load_pipeline returns the original BriaFibo2Pipeline; call it with the original arguments (image= and mask=). Options of run_fibo2.py (load_pipeline takes the same settings as arguments):

  • --offload: keep the transformer, the text encoder and the autoencoder in host memory. Each moves to the GPU for its own stage.
  • --attention int8: INT8 Q·K attention. It takes 2.05 s instead of 2.45 s here and changes the image slightly.
  • --width, --height (multiples of 16), --steps, --cfg, --seed, --negative-prompt.

Sampling defaults follow the original model card: 4 steps without guidance; --negative-prompt has no effect at guidance 1. Without --width and --height, the result keeps the aspect ratio of the first image at about one megapixel. The model is distilled for editing; for text to image use Fibo 2.0 Dev OrbitQuant W4A8.

ComfyUI

ComfyUI-OrbitQuant 0.9.0 lists this release as WaveCut/Fibo-2.0-edit-turbo-OrbitQuant-W4A8. Connect a Load Image node to reference_images of OrbitQuant Generate Image, connect OrbitQuant Model Loader to it and save the result with a standard save node. The prompt is the JSON edit caption. The node package includes the example workflow Fibo 2.0 edit turbo - edit.json. The generator runs in the Python environment that python_executable selects. Install the packages of the Usage section there.

  • profile: default, model-offload or int8-attention.
  • keep_loaded (on by default): the worker keeps the model for the next request. On the RTX 5090 the first edit of a 1216×830 photo took 11.1 s with loading and the next edit 3.0 s.
  • steps, width and height set to 0 use the defaults of the Usage section.

Through ComfyUI v0.42.1 the device peak with default was 13.0 GiB, including the 1.0 GiB that the idle ComfyUI server holds. model-offload took 20.4 s in a new worker. With default and model-offload, the images were pixel-identical to the output of run_fibo2.py for the same caption, image and seed.

Quality

All numbers compare against the original BF16 model with the same caption, seed, image and sampler. LPIPS (AlexNet) is lower when two images are closer.

Measure Result
Mean LPIPS to BF16, 8 edits 0.056
Same with nearest rounding (no calibration) 0.080

The image to edit anchors the layout, so the 4-step edits stay close to BF16. All 8 edits followed their instruction as in BF16, including the sign text change from "OPEN" to "CLOSED", the masked suitcase replacement and the dress transfer from a second image. The text encoder's six hidden-state bundles, which condition the transformer, reach a mean cosine of 0.996 to BF16 over 20 evaluation captions (0.982 with nearest rounding).

BF16 original and OrbitQuant W4A8 for four edits

Click the preview for all 8 edits. assets/evaluation_cases.json holds the edit captions with their seeds. The images to edit are crops of the original model card's examples, plus one Fibo 2.0 Dev BF16 output for the sign edit.

Performance

One RTX 5090 (575 W), Torch 2.12.1 with CUDA 13.0. One process per configuration, batch size 1. Time is the median of 3 runs after 1 warm-up run; it covers prompt encoding, sampling and VAE decoding, with CUDA synchronized at both ends. Device peak is the total from NVML at 5 ms intervals, including the CUDA context. Tensor peak is the PyTorch allocator peak. Host RAM is the peak resident set of the process, including loading.

Edit of a 1216×830 photo, 1264×864 output, 4 steps, no guidance:

Configuration Time Device peak Tensor peak Host RAM peak Checkpoint
OrbitQuant W4A8 2.45 s 11.0 GiB 9.3 GiB 5.0 GiB 8.1 GB
OrbitQuant W4A8, INT8 attention 2.05 s 11.0 GiB 9.3 GiB 5.0 GiB 8.1 GB
OrbitQuant W4A8, offload 4.41 s 6.5 GiB 5.2 GiB 12.2 GiB 8.1 GB
BF16 (original) 4.77 s 27.7 GiB 26.1 GiB 10.7 GiB 25.5 GB

The loader enables expandable allocator segments when PYTORCH_CUDA_ALLOC_CONF is empty. With --offload, each component moves to the GPU for its own stage, so the device peak is that of the largest stage. Other GPUs are untested.

Components

Component Precision Size
Transformer, 8.1B parameters (44 blocks, 2 refiner blocks, 2 Perceiver layers) OrbitQuant 4-bit weights with GPTQ rounding and 8-bit activations for the 364 projections of the self-attention, the cross-attention of the five injection blocks, the Perceiver and the SwiGLU layers. BF16 embedders, time embedding, per-block modulation, norms and output layer. 4.33 GB
Text encoder, Qwen3-VL-4B OrbitQuant 4-bit weights with GPTQ rounding and 8-bit activations for the 252 projections of the language model. BF16 vision tower (it encodes the images to edit and the drawn caption texts), token embeddings and norms. 3.43 GB
Autoencoder (FLUX.2) FP32 file of the original, loaded in BF16 as in the original pipeline 0.34 GB

The loader drops the LM head and the last decoder layer of the text encoder: the pipeline reads hidden states up to layer 34 and never the logits. The cut does not change the result: with BF16 weights, the cut and the full encoder give bit-identical caption embeddings for all 20 evaluation cases. The 0.8 GB token-embedding table stays in host memory, since a caption reads a few hundred of its 152k rows.

GPTQ calibration used 8 text-to-image captions and 4 edits written for calibration, none of them in the evaluation set: all 4 sampling steps of each BF16 run (48 transformer calls) for the transformer; the same captions, three random field subsets of each and the two negative captions (26,586 tokens, with the images to edit) for the text encoder. GPTQ keeps the codebook, rotation, bit width and file format of plain OrbitQuant; transformer/gptq-info.json and text_encoder/gptq-info.json list the error of each projection group before and after it.

Files

  • transformer/: the packed transformer (model.safetensors), its codebooks, rotations, OrbitQuant configuration and manifest, and the original config.json. gptq-info.json lists the error of each projection group before and after GPTQ rounding.
  • text_encoder/: the quantized Qwen3-VL model with its BF16 vision tower. gptq-info.json lists the GPTQ errors. vae/, processor/, scheduler/, fonts/: the files of the original model.
  • fibo2_orbitquant.py: the loader. run_fibo2.py: the command-line entry point. The fused transformer blocks come from orbitquant 0.15.
  • manifest.json: the components and the runtime pins. SHA256SUMS: the checksums of all files.
  • LICENSE: CC BY-NC 4.0. NOTICE.md: attribution and changes.
  • assets/: the images of this card.

Limits and license

  • The fused blocks run one sample at a time, as the pipeline calls the transformer.
  • Fibo 2.0 expects VGL captions. Plain-text prompts run, but the model was trained on structured captions.
  • The model is distilled for edits at 4 steps without guidance; a negative caption has no effect.
  • The evaluation covers 8 edits at one seed each.

This release is a quantized derivative of Fibo 2.0 Edit Turbo by BRIA AI and is licensed under CC BY-NC 4.0 (see LICENSE and NOTICE.md), like the original. Use is limited to non-commercial purposes; commercial use of Fibo 2.0 requires an agreement with BRIA AI: https://platform.bria.ai/licensing/pricing?model=fibo-2. BRIA AI did not create, endorse or validate this release.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for WaveCut/Fibo-2.0-edit-turbo-OrbitQuant-W4A8

Quantized
(11)
this model

Collections including WaveCut/Fibo-2.0-edit-turbo-OrbitQuant-W4A8