LaMa (Large Mask Inpainting) - Core ML Format

LaMa model converted to Apple Core ML format for macOS GPU-accelerated inference.

πŸ“– Original Model

πŸ”„ Conversion Details

This model was converted using the CoreMLaMa project by @mallman.

Conversion Steps

# Clone CoreMLaMa
git clone https://github.com/mallman/CoreMLaMa
cd CoreMLaMa

# Create environment
conda create -n coremlama python=3.10
conda activate coremlama

# Install dependencies
pip install -r requirements.txt
pip install iopaint

# Run conversion
python convert_lama.py

πŸ“₯ Usage

Load the model in a macOS application using Core ML:

import CoreML
import Vision

let config = MLModelConfiguration()
config.computeUnits = .cpuAndGPU

let model = try LaMa(configuration: config)

πŸ“Š Model Inputs/Outputs

Inputs:

  • image: 3-channel RGB image, 800Γ—800 pixels
  • mask: 1-channel grayscale mask, 800Γ—800 pixels

Output:

  • output: Inpainted 3-channel RGB image, 800Γ—800 pixels

βš–οΈ License & Attribution

This repository contains a format conversion of the original LaMa model. All rights and credit belong to the original authors.

  • Original License: Apache 2.0
  • Conversion: Format-only, no weight modifications
  • Conversion Tool Credit: CoreMLaMa by @mallman

πŸ“š Citation

If you use this model, please cite the original paper:

@inproceedings{suvorov2022resolution,
  title={Resolution-robust Large Mask Inpainting with Fourier Convolutions},
  author={Suvorov, Roman and Logacheva, Elizaveta and Mashikhin, Anton and others},
  booktitle={WACV},
  year={2022}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Paper for Jia-Liu/big-lama-coreml