
MMagic (Multimodal Advanced, Generative, and Intelligent Creation) is an open-source AIGC toolbox for professional AI researchers and machine learning engineers to explore image and video processing, editing and generation.
MMagic Inferencer provides access to various pre-trained models in computer vision. I faced challenges setting it up on a Kaggle notebook, but after some trial and error, I figured it out. In this article, I’ll walk you through the setup using their video super-resolution models as an example.
Please refer to this Kaggle Notebook for the code:
The MMagic library hasn’t been updated recently, so following the official installation instructions can lead to dependency conflicts. The simple fix is to install specific versions of the dependencies to get MMagic working.
First, install the following version of diffusers
package:
!pip install diffusers==0.24.0
Then run the following:
!pip install mmcv==2.1.0
!pip install mmengine
!pip install mmagic
With this you should be good to go. You can import the MMagicInferencer
using the following code:
from mmagic.apis import MMagicInferencer
model = MMagicInferencer('basicvsr')
You can view a list of supported models here:
With the setup complete, you can now use MMagic Inferencer to run various computer vision models. If you encounter any issues, checking the specific dependency versions should resolve most conflicts. Happy experimenting with MMagic!