MODEL OPTIMIZATION
Optimizing Stable Diffusion Models for Edge Devices
Optimized Stable Diffusion for edge devices through pruning, distillation, and quantization, followed by model format conversion and deployment on Orange Pi.
01 /Project focus
Optimize Stable Diffusion for edge devices through pruning, distillation, quantization, model format conversion, and deployment on Orange Pi.
02 /My contribution
As a Machine Learning Engineer on this capstone project at Amazon.com, Inc., I worked on a pipeline spanning pruning, distillation, quantization, model format conversion, and deployment on Orange Pi. I also reproduced Q-Diffusion and implemented timestep-aware calibration.
03 /Pruning & distillation
The optimization workflow began with pruning and distillation, followed by quantization before model conversion and deployment.
04 /Mixed quantization
Applied mixed quantization to reduce U-Net model size by 50% while maintaining image quality.
05 /Deployment
Converted PyTorch models to ONNX with static quantization and deployed them on Orange Pi using the RK3588 NPU.
06 /Results
Reduced inference latency by 55% through Stable Diffusion model quantization, alongside a 50% reduction in U-Net model size while maintaining image quality.