Devserhii's picture
Publish CyberRealistic Final LCM Core ML 6-bit
05c563b verified
|
Raw
History Blame Contribute Delete
3.31 kB
---
license: openrail++
library_name: ml-stable-diffusion
pipeline_tag: text-to-image
base_model:
- cyberdelia/CyberRealistic
- latent-consistency/lcm-lora-sdv1-5
tags:
- stable-diffusion
- stable-diffusion-1.5
- cyberrealistic
- lcm
- photorealistic
- coreml
- apple-neural-engine
- palettized
- ios
---
# CyberRealistic Final LCM · Core ML 6-bit
This is a reproducible Core ML conversion prepared for the LocalMuse iOS app.
It starts from CyberRealistic Final FP16, fuses the official SD 1.5 LCM-LoRA,
then applies Apple's 6-bit k-means weight palettization to the UNet and CLIP
text encoder. The VAE decoder and VAE encoder remain FP16.
## Pinned sources
- Base: `cyberdelia/CyberRealistic`
- revision: `99827f96edd717dacb28c68560680c201c55df05`
- file: `CyberRealistic_FINAL_FP16.safetensors`
- bytes: `2,132,651,162`
- SHA-256: `2209c07b331a06cb28cf7c830ec758ae5b49eb97fab21f5de6b18c7be8b41554`
- Adapter: `latent-consistency/lcm-lora-sdv1-5`
- revision: `cf2fced511dbe7e26c8d1d397e728fbab875db4b`
- file: `pytorch_lora_weights.safetensors`
- bytes: `134,621,556`
- SHA-256: `8f90d840e075ff588a58e22c6586e2ae9a6f7922996ee6649a7f01072333afe4`
- SD 1.5 component configuration and tokenizer:
`stable-diffusion-v1-5/stable-diffusion-v1-5` at
`451f4fe16113bff5a5d2269ed5ad43b0592e9a14`.
All source files are authenticated before the pipeline is loaded or traced.
The LoRA is fused at scale 1.0 and unloaded before Core ML conversion.
## Core ML layout
- Fixed resolution: 512 × 512
- Deployment target: iOS 17+
- Compute policy used for conversion: CPU and GPU
- Attention: `SPLIT_EINSUM_V2`
- `Unet.mlmodelc`: mixed FP16 / 6-bit palettized, 282 LUT operations
- `TextEncoder.mlmodelc`: mixed FP16 / 6-bit palettized, 74 LUT operations
- `VAEDecoder.mlmodelc`: FP16
- `VAEEncoder.mlmodelc`: FP16, included for image-to-image and Face Detail
- No safety checker is embedded
- Production payload: 957,838,366 bytes
The Core ML converter is pinned to Apple `ml-stable-diffusion` revision
`e12202c1f6405b83918b58a5d097cd61e3e1f702` with Core ML Tools 8.3.0.
The conversion performed component-level PyTorch/Core ML parity checks before
palettization. The final palettized package was then tested end-to-end with the
LocalMuse LCM scheduler, including VAE-encoder image-to-image refinement.
## Recommended settings
- Scheduler: LCM (required)
- Steps: 4–10
- Default: 8 steps
- CFG: 1.5; keep guidance in the 1.0–2.0 range
- Resolution: 512 × 512
Four, six, eight and ten steps were tested with the same prompt and seed.
Eight steps gave the best quality/speed balance; ten remained stable. This
tested 4–10 application range is intentionally a little wider than the
adapter model card's usual 2–8 recommendation.
## License and attribution
CyberRealistic and Stable Diffusion 1.5 remain subject to the CreativeML Open
RAIL-M terms in `LICENSE`. The LCM-LoRA repository declares OpenRAIL++ and its
terms are included in `LCM_LORA_LICENSE.md`. The use-based restrictions and
attribution requirements continue to apply. This repository adds no new
restrictions and does not claim authorship of the original model or adapter.
- CyberRealistic creator: Cyberdelia
- LCM-LoRA authors: Simian Luo, Yiqin Tan, Suraj Patil, Daniel Gu et al.
- Format conversion: LocalMuseAI