Diffusers
Moebius / README.md
nielsr's picture
nielsr HF Staff
Add model card, pipeline tag, and links to paper/code
db5c76d verified
|
Raw
History Blame
3.53 kB
---
license: mit
pipeline_tag: image-to-image
---
# Moebius: 0.2B Lightweight Image Inpainting Framework with 10B-Level Performance
[![Project Page](https://img.shields.io/badge/Project_Page-https://hustvl.github.io/Moebius-purple)](https://hustvl.github.io/Moebius)
[![arxiv](https://img.shields.io/badge/ECCV'26-paper-orange)](https://arxiv.org/abs/2606.19195)
[![GitHub](https://img.shields.io/badge/GitHub-Repository-blue)](https://github.com/hustvl/Moebius)
**Moebius** is a highly efficient, lightweight image inpainting framework that operates with a mere **0.22B parameters** (less than 2% of the size of the 11.9B FLUX.1-Fill-Dev) while delivering comparable or superior generation quality and a $>15\times$ acceleration in total inference time.
<div align="center">
<img src="https://github.com/hustvl/Moebius/raw/main/assets/pipeline.png" width="100%" alt="Moebius Pipeline">
</div>
## Key Features
- **Extreme Parametric Efficiency (< 2%)**: Moebius operates with a mere **0.22B (226M) parameters**, bypassing heavy-compute bottlenecks.
- **15ร— Inference Speedup**: Blistering inference latency of only **26.01 ms per step** on a single GPU.
- **10B-Level Inpainting Quality**: Performs on par with, and in certain scenarios surpasses, SOTA generalist models (*FLUX.1-Fill-Dev*, *SD3.5 Large-Inpainting*) across both natural and portrait scenes.
---
## ๐Ÿ“ฆ Environment Setup
To get started, clone the official GitHub repository, set up the environment, and install dependencies:
```bash
git clone https://github.com/hustvl/Moebius.git
cd Moebius
conda create -n moebius python=3.14.4
conda activate moebius
pip install -r requirements.txt
```
## ๐Ÿ—ƒ๏ธ Model Checkpoints Setup
Organize your model weights in the `./weight` folder as follows:
1. Download the VAE checkpoint from [hustvl/PixelHacker](https://huggingface.co/hustvl/PixelHacker/tree/main/vae) and put it into `./weight/vae`.
2. Download the Moebius checkpoints (e.g., pretrained, ft_places2, ft_celebahq, ft_ffhq) and place them under `./weight/Moebius`.
```bash
โ”œโ”€โ”€ weight
| โ”œโ”€โ”€ Moebius
| โ”œโ”€โ”€ pretrained
| โ”œโ”€โ”€ diffusion_pytorch_model.bin
| โ”œโ”€โ”€ ft_places2
| โ”œโ”€โ”€ diffusion_pytorch_model.bin
| โ”œโ”€โ”€ ft_celebahq
| โ”œโ”€โ”€ diffusion_pytorch_model.bin
| โ”œโ”€โ”€ ft_ffhq
| โ”œโ”€โ”€ diffusion_pytorch_model.bin
| โ”œโ”€โ”€ vae
| โ”œโ”€โ”€ config.json
| โ”œโ”€โ”€ diffusion_pytorch_model.bin
```
## ๐Ÿ”ฎ Inference
Run the following command to perform inpainting on custom images and masks. Place your input images and masks with matching filenames under `data/images` and `data/masks` respectively:
```bash
python -m infer.infer_moebius \
--model-config config/model_cfg/moebius.yaml \
--model-weight weight/Moebius/ft_celebahq/diffusion_pytorch_model.bin \
--real-dir data/images \
--mask-dir data/masks \
--save-dir ./outputs \
--cfg 2.0 \
--batch-size 8 \
--num-workers 8
```
## ๐ŸŽ“ Citation
If you find Moebius useful in your research, please consider citing:
```bibtex
@misc{DuanAndXu2026Moebius,
title={Moebius: 0.2B Lightweight Image Inpainting Framework with 10B-Level Performance},
author={Kangsheng Duan and Ziyang Xu and Wenyu Liu and Xiaohu Ruan and Xiaoxin Chen and Xinggang Wang},
year={2026},
eprint={2606.19195},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2606.19195},
}
```