LibreAI / Image / mmagic
// image · open-mmlab/mmagic

mmagic

MMagic — OpenMMLab's generative-AI toolbox: diffusion, text-to-image, restoration and a model zoo.

★ 7.5k stars⑂ 1.1k forksApache-2.0updated 2024-08
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

mmagic is an open-source image project by open-mmlab (open-mmlab/mmagic on GitHub). It has 7,472 GitHub stars and 1,097 forks, is released under the Apache-2.0 license, and was last updated on GitHub on 6 August 2024.

GitHub stars
7,472
Forks
1,097
License
Apache-2.0
Last updated on GitHub
6 August 2024
Category
Image
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Clarify your goal

    Pick your task (generation, restoration, inpainting and so on) and the algorithm/config you will start from in the model zoo.

  2. Get the project

    Clone open-mmlab/mmagic from GitHub (or use the install path in the run steps below) and skim its README for the parts relevant to your goal.

  3. Install and configure

    Clone the repo and install it with the OpenMMLab toolchain (mim/pip) per the official documentation for your PyTorch and CUDA versions.

  4. Run your first task

    Run a documented demo config — for example a text-to-image or super-resolution example — on a sample input before training anything.

// features

Why people love it

Broad generative coverage

Text-to-image, diffusion, image/video restoration and enhancement, inpainting, matting, colorisation and video interpolation in one toolbox.

Model zoo and configs

A curated zoo of algorithms (33+ accelerated by PyTorch 2.0) driven by OpenMMLab-style configs for reproducible experiments.

Diffusion workflows

Stable Diffusion and Disco Diffusion generation, DreamBooth and DreamBooth LoRA fine-tuning, and ControlNet-based controllability.

Acceleration support

xFormers-based acceleration and optimisation strategies to improve training and inference efficiency.

Unified data handling

Refactored DataSample and DataPreprocessor unify data formats across tasks during training and inference.

Serious evaluation

Multi-dataset evaluation supporting generation metrics (for example FID) and reconstruction metrics (for example SSIM), with TensorBoard and wandb visualisation.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Get the source from the official GitHub repository for mmagic.

    git clone https://github.com/open-mmlab/mmagic.git
    cd mmagic
  2. Clone MMagic

    Clone the repository as the first step of the documented OpenMMLab installation.

    git clone https://github.com/open-mmlab/mmagic.git
    cd mmagic
  3. Install and run a demo

    Install MMagic with the OpenMMLab toolchain for your environment, then run a documented demo config from the docs.

    # Install per https://mmagic.readthedocs.io/en/latest/ (mim/pip for your PyTorch/CUDA), then run a demo — see README
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains mmagic?

open-mmlab (OpenMMLab), through the open-mmlab/mmagic repository, with documentation at mmagic.readthedocs.io.

Is mmagic free to use?

Yes — the project is open source under the Apache-2.0 license as recorded for this listing. See the license terms for any conditions on redistribution.

Does mmagic need a paid API key?

No API keys are involved — models run locally on your GPUs; MMagic is free under Apache-2.0, and you supply the compute and datasets.

How does MMagic compare to a single-model diffusion library?

Single-model libraries do one pipeline well. MMagic is a research toolbox spanning many generative tasks and algorithms with shared configs, data handling and evaluation — broader and more configurable, with a steeper OpenMMLab learning curve.

How do I get started with mmagic?

Clone the repository (or use the documented installer), follow the install and configure steps on this page, and run the smallest real task first — run a documented demo config — for example a text-to-image or super-resolution example — on a sample input before training anything.

// keep exploring

Similar tools

Image

OmniGen

OmniGen: one unified model for text-to-image, editing, subject-driven and identity-preserving generation

★ 4.3k starsMIT
View guide →
Image

Kandinsky-2

Kandinsky 2.2 — multilingual text-to-image latent diffusion with ControlNet, inpainting and image fusion

★ 2.8k starsApache-2.0
View guide →
Image

TensorStack

C# generative AI SDK — text, image, video and audio via ONNX

★ 44 starsApache-2.0
View guide →
Image

stable-diffusion.cpp

Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++

★ 7.5k starsMIT
View guide →
Image

HunyuanImage-3.0

Tencent's HunyuanImage-3.0 — a powerful native multimodal model for image generation.

★ 3.3k starsNOASSERTION
View guide →
Image

linkedin-content-creator

AI LinkedIn content studio — text, image and carousel posts on a calendar

★ 97 starsMIT
View guide →
// alternatives

Alternatives in Image

The most-starred other Image projects in the LibreAI catalogue — the realistic shortlist if mmagic is not the right fit.

Get mmagic

Free and open — grab the source, star the repo, and start creating.