---
title: MI-GAN-512-places2-fp16
canonical_url: "https://www.modelscope.cn/models/mlx-community/MI-GAN-512-places2-fp16"
md_url: "https://www.modelscope.cn/models/mlx-community/MI-GAN-512-places2-fp16.md"
repository: mlx-community/MI-GAN-512-places2-fp16
last_updated: 2026-06-24
license: mit
pipeline_tag: image-to-image
tasks:
  - image-to-image
base_model:
  - Picsart-AI-Research/MI-GAN
base_model_relation: finetune
parameters: 7.4M
tensor_type:
  - F16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 18
stars: 0
tags:
  - mlx
  - inpainting
  - object-removal
---

# MI-GAN-512-places2-fp16

> MI-GAN-512-places2-fp16 - mlx-community 在 ModelScope 开源的模型。mlx-community/MI-GAN-512-places2-fp16

mlx-community/MI-GAN-512-places2-fp16 是 ModelScope 魔搭社区上的 7.4M 参数image-to-image模型，采用 mit 许可，基于 Picsart-AI-Research/MI-GAN 构建。

- **Repository**: mlx-community/MI-GAN-512-places2-fp16
- **License**: mit
- **Tasks**: image-to-image
- **Parameters**: 7.4M
- **Base model**: Picsart-AI-Research/MI-GAN
- **Tags**: mlx, inpainting, object-removal
- **Downloads**: 18
- **Stars**: 0
- **Last updated**: 2026-06-24

Source: https://www.modelscope.cn/models/mlx-community/MI-GAN-512-places2-fp16

---

# mlx-community/MI-GAN-512-places2-fp16

MI-GAN mobile inpainting, 512 Places2 (fast/on-device tier).

Converted to **Apple MLX** (`-fp16`) for Apple-Silicon inference via the
[`mlx-lama-swift`](https://github.com/xocialize/mlx-lama-swift) Swift package (the MLXEngine
`imageInpaint` ModelPackage / Forge **Erase** capability). From-scratch MLX-Swift architecture port
of [Picsart-AI-Research/MI-GAN](https://github.com/Picsart-AI-Research/MI-GAN); parity-locked vs the PyTorch oracle on the CPU stream
(LaMa predicted max_abs 3.2e-5 · MI-GAN 5.5e-5).

## Use

```swift
// Package.swift → .package(url: "https://github.com/xocialize/mlx-lama-swift", from: "0.1.0")
import LaMa   // or MIGAN
let inpainter = try LaMaInpainter.fromPretrained(weightsPath, dtype: .float16)
let filled: CGImage = inpainter(sourceCGImage, mask: maskCGImage)  // white mask = remove
```

Input: image + mask (white = region to remove). Output: filled image at source resolution.
Weights license: mit. Port code: MIT.
