YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Stable Diffusion 1.5 LCM Inpainting β CoreML (SHxTLxST)
CoreML .mlpackage versions of SimianLuo/LCM_Dreamshaper_v7 configured for inpainting, palettized per Apple's LCM recommendation (TextEncoder/VAE at 6-bit, UNet at 8-bit).
Used by SHxTLxST iOS app for lifestyle image generation from masked product photos.
Submodels
| Submodel | nbits | Size | Purpose |
|---|---|---|---|
TextEncoder.mlpackage |
6-bit | 88 MB | CLIP text encoding |
Unet.mlpackage |
8-bit | 821 MB | Latent diffusion (inpainting) |
VAEEncoder.mlpackage |
6-bit | 25 MB | Image -> latent |
VAEDecoder.mlpackage |
6-bit | 36 MB | Latent -> image |
Total: 970 MB (well within iOS app size budgets)
Usage (iOS, Swift)
import CoreML
let config = MLModelConfiguration()
config.computeUnits = .all // ANE + GPU + CPU
let textEncoder = try TextEncoder(configuration: config)
let unet = try Unet(configuration: config)
let vaeEncoder = try VAEEncoder(configuration: config)
let vaeDecoder = try VAEDecoder(configuration: config)
For inference, see apple/ml-stable-diffusion β this package is drop-in compatible, with the UNet modified to accept a 9-channel input (4 latent + 4 masked image latent + 1 mask) per the inpainting convention.
Files
Resources/β the four.mlpackagesubmodelstokenizer/β CLIP tokenizer (vocab.json + merges.txt)scheduler_config.jsonβ LCM scheduler configmanifest.jsonβ per-submodel quantization metadata
Source
- Original PyTorch model: SimianLuo/LCM_Dreamshaper_v7
- Base: runwayml/stable-diffusion-v1-5
- Conversion script: convert_sd_inpaint_apple.py
- Conversion pipeline: trace on Linux+GPU -> convert on macOS (coremltools
BlobWriteris macOS-only)
License
Original SD 1.5: CreativeML Open RAIL-M. The CoreML conversion is a derivative work; this repo inherits the Open RAIL-M license.
- Downloads last month
- 19