EdgeDiffuse: Optimizing Stable Diffusion Models


Project Overview

This project, developed in collaboration with Amazon, aimed to democratize AI image generation by enabling Stable Diffusion models to run efficiently on affordable edge devices (e.g., Orange Pi). The core challenge was to significantly reduce model size and inference latency while maintaining acceptable image quality.

Objectives

Technical Methods

We employed a multi-stage optimization pipeline focusing on three key techniques:

1. Mixed-Precision Quantization

We implemented 8-bit and 4-bit mixed-precision quantization. By selectively reducing the precision of weights and activations, we achieved significant memory savings.

2. Knowledge Distillation

We utilized knowledge distillation to train smaller "student" models that mimic the behavior of the larger "teacher" Stable Diffusion models. This allowed us to capture the generative capabilities of the full model in a much more compact architecture.

3. Weight Pruning

We applied pruning to remove less important neural connections (weights close to zero).

Results & Achievements

Skills Applied