Instructions to use OzzyGT/fibo_2_0_dev_sdnq_dynamic_8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/fibo_2_0_dev_sdnq_dynamic_8bit with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OzzyGT/fibo_2_0_dev_sdnq_dynamic_8bit", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Fibo 2.0 Dev SDNQ INT8
Left: original bf16 路 Right: this INT8 model (same prompt and seed).
This is a dynamic 8-bit quantized version of briaai/Fibo-2.0-dev 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 Dev 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 text-to-image sample peaked at 15.1 GiB of VRAM at 1424x800, with the whole pipeline on the GPU.
Fibo 2.0 Dev is the full, non-distilled model: one model for text-to-image and editing. Use num_inference_steps=50 and guidance_scale=5.0, with the negative prompts from the original card: one for text-to-image and the empty caption for edits. For editing 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, styles, masked edits and fine-tuning, see the original model card.
Text rendering sample
Fibo 2.0 puts text in the image through the caption's text_render entries, each with its own text, location, size, color and font. The image above asks for five texts on one shop front: gold-leaf lettering on the window, two lines of chalk on a sign and a printed notice on the door. It was generated with the following prompt and settings (seed 7).
import json
import sdnq # noqa: F401
import torch
from diffusers import BriaFibo2Pipeline
from huggingface_hub import hf_hub_download
repo = "OzzyGT/fibo_2_0_dev_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")]
negative_prompt = '{"short_description":"","objects":[{"description":"the main subject","texture":"smooth, featureless, plastic-like, airbrushed, no fine surface detail","appearance_details":"soft blurred edges, simplified shapes, no fine detail","skin_tone_and_texture":"waxy airbrushed skin, poreless, plastic smooth"}],"background_setting":"a plain seamless studio backdrop, perfectly smooth gradient, blurred and featureless, no visible texture","lighting":{},"aesthetics":{"artifacts":["oversaturated colours","neon colour cast","overexposed highlights","lens flare","slight blur","motion blur","haze"]},"photographic_characteristics":{"depth_of_field":"shallow, heavy bokeh obscuring most of the frame","focus":"soft, slightly out of focus, lacking fine texture"},"style_medium":"","context":"","artistic_style":""}'
prompt = {
"short_description": "The street front of a small letterpress print shop in an old town, photographed at eye level in late morning. Gold-leaf serif letters on the large shop window read \"HARBOR LANE LETTERPRESS\" with \"EST. 1987\" below. A black chalkboard A-frame sign on the cobblestone pavement in front of the door reads \"WEDDING INVITATIONS\" and \"100 cards from $85\" in hand-written white chalk, and a printed paper notice taped inside the glass door reads \"BACK AT 2:30\".",
"objects": [
{
"description": "A wide shop window in a dark green painted wooden frame, with stacks of printed cards, a small cast-iron hand press and rolls of paper visible on a table behind the glass.",
"location": "center-left",
"relationship": "Set in the shop front to the left of the door, carrying the gold lettering.",
"relative_size": "large within frame",
"shape_and_color": "Rectangular, dark green frame around clear glass.",
"texture": "glossy painted wood with small chips at the corners, clean glass"
},
{
"description": "A glass-panelled wooden door painted the same dark green, with a brass handle and a white paper notice taped on the inside of the glass at eye height.",
"location": "center-right",
"relationship": "To the right of the shop window, behind the chalkboard sign.",
"relative_size": "medium",
"shape_and_color": "Tall rectangle, dark green with a brass handle.",
"texture": "painted wood, worn brass"
},
{
"description": "A black wooden chalkboard A-frame sign about one meter tall, with hand-written white chalk lettering and faint smudges of earlier wiped-off writing.",
"location": "bottom right foreground",
"relationship": "Stands on the pavement just in front of the door, facing the camera.",
"relative_size": "medium",
"shape_and_color": "Upright trapezoid, matte black board in a raw wood frame.",
"texture": "dusty chalkboard surface, rough wood frame",
"orientation": "facing the camera"
}
],
"background_setting": "A narrow old-town street with grey cobblestones and a stone curb. The shop front sits in a pale ochre plastered building with a stone doorstep; a neighboring shop with a striped awning is partly visible at the right edge of the frame.",
"lighting": {
"conditions": "overcast daylight",
"direction": "front-lit from the street",
"shadows": "faint, diffuse shadows under the sign and the window sill, with reflections of the street in the glass"
},
"aesthetics": {
"composition": "frontal medium-wide shot, the window and door filling the frame, the chalkboard sign in the lower right",
"color_scheme": "dark green and gold against ochre plaster and grey stone, black and white chalkboard",
"mood_atmosphere": "quiet"
},
"photographic_characteristics": {
"depth_of_field": "deep, f/8",
"focus": "sharp focus on the window lettering and the chalkboard",
"camera_angle": "eye-level, handheld",
"lens_focal_length": "35mm lens at f/8, 1/250 s, ISO 200"
},
"style_medium": "photograph",
"text_render": [
{
"text": "HARBOR LANE LETTERPRESS",
"location": "upper center of the shop window",
"size": "large within frame",
"color": "gold",
"font": "classic serif capitals",
"appearance_details": "gold leaf with a thin black outline, applied on the inside of the glass"
},
{
"text": "EST. 1987",
"location": "on the shop window, centered below the shop name",
"size": "small",
"color": "gold",
"font": "classic serif capitals",
"appearance_details": "gold leaf, matching the shop name"
},
{
"text": "WEDDING INVITATIONS",
"location": "top line of the chalkboard sign, lower right",
"size": "medium",
"color": "white",
"font": "hand-written chalk capitals",
"appearance_details": "chalk on the black board"
},
{
"text": "100 cards from $85",
"location": "second line of the chalkboard sign, below WEDDING INVITATIONS",
"size": "medium",
"color": "white",
"font": "hand-written chalk lettering",
"appearance_details": "chalk on the black board"
},
{
"text": "BACK AT 2:30",
"location": "on a paper notice taped inside the glass of the door",
"size": "small",
"color": "black",
"font": "bold printed sans-serif",
"appearance_details": "printed on white paper, slightly curled at one corner"
}
],
"context": "A street photograph of a small business front, taken with a mirrorless camera.",
"artistic_style": "realistic"
}
image = pipe(
prompt=json.dumps(prompt),
negative_prompt=negative_prompt,
width=1424,
height=800,
num_inference_steps=50,
guidance_scale=5.0,
fonts=fonts,
generator=torch.Generator("cuda").manual_seed(7),
).images[0]
image.save("letterpress_shop.png")
Editing sample
Left: source photo by Sand Crain on Unsplash 路 Middle: original bf16 路 Right: this INT8 model (same input, prompt and seed).
The source photo is resized to 864x1152. The edit peaked at 14.7 GiB of VRAM, measured the same way as the text-to-image sample.
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_dev_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_dev/seal.jpg")
negative_prompt = '{"short_description":"","objects":[],"background_setting":"","lighting":{},"aesthetics":{},"photographic_characteristics":{},"style_medium":"","context":"","artistic_style":""}'
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),
negative_prompt=negative_prompt,
image=source,
num_inference_steps=50,
guidance_scale=5.0,
fonts=fonts,
generator=torch.Generator("cuda").manual_seed(7),
).images[0]
image.save("sea_lion_tuxedo.png")
Multi-reference sample
Fibo 2.0 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.
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.
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_dev_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_dev/{name}.jpg") for name in ("room", "sofa", "dog", "cat")]
negative_prompt = '{"short_description":"","objects":[],"background_setting":"","lighting":{},"aesthetics":{},"photographic_characteristics":{},"style_medium":"","context":"","artistic_style":""}'
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),
negative_prompt=negative_prompt,
image=images,
width=1248,
height=832,
num_inference_steps=50,
guidance_scale=5.0,
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
- 7
Model tree for OzzyGT/fibo_2_0_dev_sdnq_dynamic_8bit
Base model
briaai/Fibo-2.0-dev









