Moebius  by hustvl

Lightweight image inpainting framework achieving SOTA performance with extreme efficiency

Created 3 weeks ago

New!

481 stars

Top 63.0% on SourcePulse

GitHubView on GitHub
Project Summary

Moebius is a lightweight image inpainting framework designed to achieve state-of-the-art performance with significantly reduced computational resources. It targets researchers and practitioners who need high-quality inpainting capabilities without the prohibitive costs associated with large-scale foundation models, offering a compelling alternative for deployment on consumer-grade or edge devices. The primary benefit is achieving 10B-level inpainting quality and speed with only 0.2B parameters.

How It Works

Moebius challenges the "scale-at-all-costs" paradigm by synergistically optimizing architectural design and knowledge distillation. Its core innovations include the LλMI Block, which reformulates attention mechanisms to condense spatial context and semantic priors into fixed-size linear matrices, thereby bypassing quadratic computational overhead. This is complemented by an Adaptive Multi-Granularity Distillation Strategy that transfers knowledge from a larger teacher model (PixelHacker) within the latent space. This approach aligns multi-granularity supervision and dynamically balances training, enabling Moebius to shatter the "impossible triangle" of low parameters, fast inference, and high quality.

Quick Start & Requirements

Installation involves creating a Conda environment with Python 3.14.4 and installing dependencies from requirements.txt, including PyTorch 2.7.1, diffusers 0.38.0, transformers 4.56.2, and flash-linear-attention 0.3.2. Model checkpoints (VAE and Moebius weights) must be downloaded separately and placed in the specified ./weight/ directory structure. Inference code is provided, with training scripts supporting distributed execution.

Highlighted Details

  • Extreme Parametric Efficiency: Operates with only 0.22B parameters, less than 2% of comparable 10B-level models like FLUX.1-Fill-Dev.
  • 15× Inference Speedup: Achieves a per-step latency of 26.01 ms, enabling significantly faster total runtime.
  • 10B-Level Quality: Performs on par with or surpasses SOTA 10B-level models (e.g., FLUX.1-Fill-Dev, SD3.5 Large-Inpainting) across six benchmarks for natural and portrait scenes.
  • Core Innovations: LλMI Block for efficient attention, Adaptive Multi-Granularity Distillation, and Optimal Synergistic Balancing between architecture and distillation.

Maintenance & Community

The project is associated with researchers from Huazhong University of Science and Technology and VIVO AI Lab. Recent Hugging Face rankings (No. 1 daily, No. 4 weekly as of June 2026) indicate strong recent community interest and adoption. Specific community channels like Discord or Slack are not detailed in the README.

Licensing & Compatibility

Moebius is released under the Apache 2.0 license. This permissive license generally allows for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Moebius is presented as a task-specific specialist rather than a broad generalist model. The setup requires specific, relatively recent versions of Python (3.14.4) and several core libraries, which may pose compatibility challenges with existing environments. The project was first submitted to GitHub on June 16, 2026, indicating it is a very recent release.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
482 stars in the last 25 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Lyumin Zhang Lyumin Zhang(Author of ControlNet), and
4 more.

Fooocus by lllyasviel

0.5%
51k
Image generator for streamlined prompting and generation using SDXL
Created 2 years ago
Updated 7 months ago
Feedback? Help us improve.