Built with ML Intern

Fibo 2.0 Edit β€” IDM 2-Steps

Bria Fibo 2.0 Edit Turbo image editing in 2 network evaluations, no CFG β€” a single LoRA adapter. Community implementation of Intrinsic Distribution Matching (IDM) (Liu et al., arXiv:2610.39633), compressing the 4-step distilled editing model to 2 steps.

Try it: fibo2-edit-idm-demo

DiT forwards / edit
Fibo 2.0 Edit Turbo (4 steps, no CFG) 4
This adapter (2 steps, no CFG) 2

Showcase

10 studio portraits (generated with Fibo 2.0 Dev), each edited once with the IDM 2-step adapter β€” input | ours Β· 2 steps. Instructions in showcase/instructions.txt; individual images in showcase/.

showcase grid

Method

IDM stack, faithful to arXiv:2610.39633 with one engineering adaptation:

  • Internal distribution matching β€” real score from the frozen 4-step teacher (no separate teacher in memory: fake-score, generator and EMA branches are LoRA adapters on one shared base, selected per forward; the teacher is the same base with adapters disabled). DMD direction sg[v_real βˆ’ v_fake], clamped to Β±1 as in APEX.
  • Feature moment loss (L_pop, Ξ» = 0.5) β€” mean and per-coordinate standard deviation matching in the generator's EMA feature space (mean-pooled last-block hidden states at high noise levels), two FIFO queues of K = 16384, per Eq. 13 of the paper. Reference distribution: ground-truth edited images.
  • Fake-score branch trained with flow matching on detached generator outputs.

Recipe: LoRA r=64 Ξ±=64 all-linear, AdamW lr 1e-4 (betas 0.9/0.99), bf16, grad checkpointing, 1024Γ—1024, global batch 16, 550 steps (300 + 250 resumed) on 4Γ—H200. EMA decay 0.99. Init: zero-LoRA on briaai/Fibo-2.0-edit-turbo.

Data: 9,000 editing triplets from UltraEdit_500k (free-form, clip_sim_dir β‰₯ 0.1), plain-text instructions. Eval: MagicBrush test split (never trained on).

Checkpoints: checkpoints/step{100..500}/ and final (step 550) at repo root.

Usage

import torch
from diffusers import BriaFibo2Pipeline
from diffusers.utils import load_image

pipe = BriaFibo2Pipeline.from_pretrained("briaai/Fibo-2.0-edit-turbo", torch_dtype=torch.bfloat16).to("cuda")
pipe.load_lora_weights("akhaliq/Fibo-2.0-edit-IDM-2steps", weight_name="pytorch_lora_weights.safetensors")

image = load_image("photo.jpg")
edited = pipe("make the jacket red leather", image=image,
              num_inference_steps=2, guidance_scale=1.0).images[0]
edited.save("edited.png")

Eval results

MagicBrush test, 128 first-turn rows (L1 ↓, CLIP-I ↑, CLIP-T ↑ vs ground-truth target):

Model Steps L1 ↓ CLIP-I ↑ CLIP-T ↑
Fibo 2.0 Edit Turbo (teacher) 4 0.0479 0.9180 0.2066
Fibo 2.0 Edit Turbo, naive 2 0.0464 0.9131 0.2079
IDM 2-step (this adapter) 2 computing computing computing

IDM row lands shortly; raw files in eval/. Head-to-head vs linoyts/Qwen-Image-2.1-DMD2-2steps skipped for now (their text encoder is prohibitively slow uncompiled; can be added later).

Training-time comparison grids (source | naive 2-step | IDM 2-step | target): samples/. Naive 1-step probe: probe_1step/ (1-step is viable β€” a future IDM 1-step cascade target).

Limitations

  • Few-step editing favors attribute-level edits (color, expression, object swap, style). Large structural transformations are hard for any few-step editor β€” see the honest verdict in akhaliq/MOSS-Image-IDM-2-Steps.
  • Trained on square 1024px crops of UltraEdit free-form edits; masked and multi-reference editing are inherited from the base model but were not distilled explicitly.
  • License follows the base model: CC BY-NC 4.0 (non-commercial), per Bria's terms.

Citation

@misc{liu2026intrinsicdistributionmatching,
  title={Intrinsic Distribution Matching},
  author={Deyuan Liu and Yansen Han and Kaiwen Zheng and Jun Xie and Jiacheng Liu and Zhenglin Cheng and Peng Sun and Jintao Zhang and Jianguo Li and Tao Lin},
  year={2026}, eprint={2610.39633}, archivePrefix={arXiv}, primaryClass={cs.CV},
  url={https://arxiv.org/abs/2610.39633},
}

Base model: Fibo 2.0 (Bria AI). Method grounding: DMD2, APEX/TwinFlow internal-score construction.

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

Model tree for akhaliq/Fibo-2.0-edit-IDM-2steps

Adapter
(1)
this model

Space using akhaliq/Fibo-2.0-edit-IDM-2steps 1

Papers for akhaliq/Fibo-2.0-edit-IDM-2steps