---
license: mit
pipeline_tag: image-to-image
---
# Moebius: 0.2B Lightweight Image Inpainting Framework with 10B-Level Performance
[](https://hustvl.github.io/Moebius)
[](https://arxiv.org/abs/2606.19195)
[](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.
## 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},
}
```