Fibo 2.0 Edit Turbo SDNQ INT8

Source bf16 INT8
Source bf16 INT8

Left: source photo by Sand Crain on Unsplash 路 Middle: original bf16 路 Right: this INT8 model (same input, prompt and seed).

This is a dynamic 8-bit quantized version of briaai/Fibo-2.0-edit-turbo using SDNQ. Both the transformer and the Qwen3-VL-4B text encoder are quantized; the VAE stays in bf16.

Note: You need SDNQ v0.2.8 or superior and diffusers 0.42.0 or superior.

Usage

Fibo 2.0 Edit Turbo runs with BriaFibo2Pipeline. Import sdnq before loading so the quantized weights are registered. On disk the transformer is 8.1 GB and the text encoder 4.8 GB. The sample below peaked at 14.7 GiB of VRAM at 864x1152, with the whole pipeline on the GPU.

The model is distilled for few-step editing: use num_inference_steps=4 and guidance_scale=1.0. It takes the image to edit, or up to 4 reference images that the instruction names <image_1>, <image_2> and so on. The fonts folder holds the fonts the pipeline uses to draw the text of a caption's text_render entries, as in the original repository.

Fibo 2.0 reads its prompts as structured JSON captions. The prompts below were written by hand following the VGL caption guide; bria-vgl can also write them from a one-line request. For prompting, masked edits and more, see the original model card.

Sample image

The INT8 image above was generated with the following input, prompt and settings (seed 7). The source photo is resized to 864x1152.

import json

import sdnq  # noqa: F401
import torch
from diffusers import BriaFibo2Pipeline
from diffusers.utils import load_image
from huggingface_hub import hf_hub_download


repo = "OzzyGT/fibo_2_0_edit_turbo_sdnq_dynamic_8bit"
pipe = BriaFibo2Pipeline.from_pretrained(repo, dtype=torch.bfloat16).to("cuda")
fonts = [hf_hub_download(repo, name, subfolder="fonts") for name in ("Aileron-Regular.otf", "DejaVuSans.ttf")]

source = load_image("https://huggingface.co/datasets/OzzyGT/diffusers-examples/resolve/main/fibo_2_0_edit_turbo/seal.jpg")

prompt = {
    "short_description": "A California sea lion sits upright on a sandy beach with its head tilted back and its eyes closed, dressed in a black tuxedo jacket with satin lapels, a white dress shirt front and a black bow tie, and wearing a black silk top hat. Waves break on the shore behind it in bright sunlight.",
    "objects": [
        {
            "description": "A California sea lion with sleek, wet dark brown fur dusted with sand, long pale whiskers, small ear flaps and a light tan muzzle, its eyes closed and its nose pointing up.",
            "location": "center",
            "relationship": "Sits on the sand in the foreground, wearing the tuxedo and the top hat.",
            "relative_size": "large within frame",
            "shape_and_color": "Tall, curved upright body in glossy dark brown.",
            "texture": "smooth, wet fur with grains of sand",
            "orientation": "sitting upright on its front flippers, body turned to the right, head tilted back"
        },
        {
            "description": "A black tuxedo jacket with black satin peak lapels over a crisp white dress shirt front and a black satin bow tie at the neck.",
            "location": "center, on the sea lion's chest and shoulders",
            "relationship": "Worn by the sea lion, fitted around its chest with the flippers coming out of the sleeves.",
            "relative_size": "medium",
            "shape_and_color": "Black jacket with a white shirt front and a black bow tie.",
            "texture": "fine wool with glossy satin lapels"
        },
        {
            "description": "A tall black silk top hat with a black grosgrain band.",
            "location": "top center, on the sea lion's head",
            "relationship": "Sits on top of the sea lion's head, tilted back with it.",
            "relative_size": "small",
            "shape_and_color": "Tall cylindrical crown with a narrow brim, glossy black.",
            "texture": "smooth, glossy silk",
            "orientation": "tilted back"
        }
    ],
    "background_setting": "A sandy beach with wet sand and dark rocks at the waterline, and blue-green sea with white breaking waves behind them. A small pink buoy floats in the water.",
    "lighting": {
        "conditions": "bright midday sunlight",
        "direction": "front-lit from the upper left",
        "shadows": "a crisp shadow of the sea lion on the sand to the left"
    },
    "aesthetics": {
        "composition": "centered, the sea lion filling the frame from the sand to the top of its hat",
        "color_scheme": "dark brown and black against warm sand and blue-green sea, with white accents",
        "mood_atmosphere": "playful"
    },
    "photographic_characteristics": {
        "depth_of_field": "shallow, the sea blurred",
        "focus": "sharp focus on the sea lion",
        "camera_angle": "low angle",
        "lens_focal_length": "standard lens (e.g., 35mm-50mm)"
    },
    "style_medium": "photograph",
    "context": "A wildlife photograph from a beach.",
    "artistic_style": "realistic",
    "edit_instruction": "Add a black tuxedo with a bow tie and a black top hat to the sea lion."
}

image = pipe(
    prompt=json.dumps(prompt),
    image=source,
    num_inference_steps=4,
    guidance_scale=1.0,
    fonts=fonts,
    generator=torch.Generator("cuda").manual_seed(7),
).images[0]
image.save("sea_lion_tuxedo.png")

Multi-reference sample

Fibo 2.0 Edit Turbo combines up to 4 reference images into one scene. In this example the room is <image_1>, the sofa <image_2>, the dog <image_3> and the cat <image_4>, each resized to the size the pipeline uses for it.

<image_1> <image_2> <image_3> <image_4>
Room Sofa Dog Cat
bf16 INT8
bf16 INT8

Left: original bf16 路 Right: this INT8 model (same inputs, prompt and seed).

The room is a photo by Christian Lue on Unsplash, the sofa by personalgraphic.com on Unsplash, the dog by Ryan Walton on Unsplash and the cat by Stefan Szankowski on Unsplash. The edit peaked at 15.3 GiB of VRAM at 1248x832, measured the same way as the sample image.

import json

import sdnq  # noqa: F401
import torch
from diffusers import BriaFibo2Pipeline
from diffusers.utils import load_image
from huggingface_hub import hf_hub_download


repo = "OzzyGT/fibo_2_0_edit_turbo_sdnq_dynamic_8bit"
pipe = BriaFibo2Pipeline.from_pretrained(repo, dtype=torch.bfloat16).to("cuda")
fonts = [hf_hub_download(repo, name, subfolder="fonts") for name in ("Aileron-Regular.otf", "DejaVuSans.ttf")]

images = [load_image(f"https://huggingface.co/datasets/OzzyGT/diffusers-examples/resolve/main/fibo_2_0_edit_turbo/{name}.jpg") for name in ("room", "sofa", "dog", "cat")]

prompt = {
    "short_description": "A tan leather two-seat sofa stands in the middle of a bare room of an old city apartment, facing the camera, with a tall white triple window behind it. A pale golden cocker spaniel puppy with long wavy ginger ears and a pink-red collar sits on the left seat cushion, and a chubby ginger tabby cat with a white chest sits on the right one, the two leaning into each other shoulder to shoulder, both faces turned to the camera. Sunlight from the window falls across the wooden floor.",
    "objects": [
        {
            "description": "A mid-century two-seat sofa upholstered in tan cognac leather, with two button-tufted back cushions, two grid-tufted seat cushions, straight track arms, a round bolster pillow against each arm and four short tapered wooden legs.",
            "location": "center foreground",
            "relationship": "Stands on the wooden floor with its back to the window; the puppy and the cat sit on its seat cushions.",
            "relative_size": "large within frame",
            "shape_and_color": "Low rectangular sofa in warm tan brown with darker walnut legs.",
            "texture": "soft, slightly worn leather with tufted stitching",
            "orientation": "front-facing"
        },
        {
            "description": "A young cocker spaniel puppy with a pale golden cream coat, long wavy ginger-brown ears that flare out from its head, blue-grey eyes, a dark brown nose dusted with sand, long whiskers and a pink-red leather collar with a silver buckle.",
            "location": "center-left, on the sofa's left seat cushion",
            "relationship": "Sits upright beside the cat, its shoulder leaning against the cat's side.",
            "relative_size": "medium",
            "shape_and_color": "Slender puppy body in pale gold with darker ginger ears.",
            "texture": "soft, short fur with long feathered ears",
            "orientation": "sitting upright, facing the camera, chin slightly raised"
        },
        {
            "description": "A chubby ginger tabby cat with a round face, small ears, a white chest and white paws, its eyes half closed.",
            "location": "center-right, on the sofa's right seat cushion",
            "relationship": "Sits upright beside the puppy, leaning its head against the puppy's shoulder.",
            "relative_size": "medium",
            "shape_and_color": "Round, plump body in orange-cream fur with faint darker stripes and white markings.",
            "texture": "thick, soft fur",
            "orientation": "sitting upright, facing the camera"
        }
    ],
    "background_setting": "A bare room in an old city apartment with off-white walls and honey-colored wood laminate flooring. The back wall holds a tall white triple window with its middle casement open onto a cream building facade with wrought-iron balconies, above a white paneled window bench. A white radiator sits recessed into the right wall near the corner, below a small wooden shelf on black metal brackets.",
    "lighting": {
        "conditions": "bright daylight through the window",
        "direction": "backlit from the window",
        "shadows": "a patch of sunlight on the floor in front of the window, soft shadow under the sofa"
    },
    "aesthetics": {
        "composition": "wide shot from the room's corner, sofa centered in the lower half, window behind it",
        "color_scheme": "warm off-white walls and honey wood with tan leather and ginger fur",
        "mood_atmosphere": "calm"
    },
    "photographic_characteristics": {
        "depth_of_field": "deep",
        "focus": "sharp focus on the sofa and the animals",
        "camera_angle": "eye-level",
        "lens_focal_length": "wide-angle (e.g., 24mm-28mm)"
    },
    "style_medium": "photograph",
    "context": "An interior photograph of an apartment living room.",
    "artistic_style": "realistic",
    "edit_instruction": "Place the sofa from <image_2> in the empty room in <image_1>, and make the dog from <image_3> and the cat from <image_4> cuddle together on the sofa."
}

image = pipe(
    prompt=json.dumps(prompt),
    image=images,
    num_inference_steps=4,
    guidance_scale=1.0,
    width=1248,
    height=832,
    fonts=fonts,
    generator=torch.Generator("cuda").manual_seed(7),
).images[0]
image.save("living_room.png")

License

This model is released under the same license as the original, Creative Commons Attribution-Non-Commercial 4.0 (CC BY-NC 4.0), for non-commercial use. Commercial use requires a separate agreement with Bria.

Downloads last month
29
Safetensors
Model size
8B params
Tensor type
BF16
路
I8
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for OzzyGT/fibo_2_0_edit_turbo_sdnq_dynamic_8bit

Quantized
(14)
this model