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 β€” same image, instruction and seed, three ways: naive 2-step vs this adapter vs the 4-step teacher.

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

Samples

Training-time comparison grids β€” source | naive 2-step (current Fibo at 2 steps) | IDM 2-step (this adapter) | ground-truth target:

Step 200:

step 200 grid

Step 300:

step 300 grid

Step 400:

step 400 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 metrics (L1, CLIP-I, CLIP-T) for naive 2-step vs IDM 2-step vs 4-step teacher vs linoyts/Qwen-Image-2.1-DMD2-2steps β€” being computed now; will be published here and in eval/.

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