EDGE FDE
AdvancedDiffusion LoRA to Core AI on device
A practical skill for putting a personalized model on a phone. Train a LoRA on a Mac so a catalog diffusion model learns a subject or style. Then merge that change into the base model (bake it: merge the LoRA into the base and export one model file). Export a portable .aimodel resource, and run the personalized generator on the device. You own the model, keep the pictures private, get fast results, and work offline because the model file is stored on the phone. A cloud adapter you swap in at request time does not give you those things.
For someone who can run Python on a Mac and ship a small Xcode 27 app. Pair this with LLM LoRA for your writing style. The two courses teach the same personalization skill in two places: pictures here, writing there.
The real path
Core AI has no documented hot-swap LoRA. That means you cannot load a new adapter on the phone at run time. Do not design an app that tries to attach a LoRA on device. Train the LoRA on a Mac with MPS, or CPU if MPS is missing. Merge it into the base. Export with coreai.diffusion.export, or with torch.export plus coreai-torch. Ship the on-device .aimodel resource folder.
Lessons
Key concepts
- Train a LoRA on a Mac, merge it into a catalog base, export one
.aimodelfolder, generate offline on device. - Core AI has no documented hot-swap LoRA. Bake first. Do not attach an adapter at runtime.
- Training uses MPS or CPU only. Never CUDA.
- Course bases are
sd-1.5andsd-2.1fromapple/coreai-models.
Takeaways
- You can personalize a diffusion model and ship the baked file on the phone.
- You export with
coreai.diffusion.exportortorch.exportpluscoreai-torch. - You ship a multi-component resource folder, not
adapter_model.safetensorsalone.
Agent briefs
Related courses
PyTorch to Core AI in Xcode · From the metal to the model · Core AI models, typed · Model architectures in plain English · LLM LoRA for your writing style