Abstract
Large-scale diffusion models like SDXL and CogVideoX offer state-of-the-art generative capabilities but impose significant computational demands. Deploying these models solely in the cloud introduces latency and cost bottlenecks, while edge-only deployment often necessitates model compression that degrades output quality. This paper presents EC-Diff, an edge-cloud collaborative inference framework that achieves up to a 2.5× speedup without compromising fidelity. EC-Diff introduces a k-step noise approximation strategy to bypass redundant cloud computations and a two-stage greedy search algorithm to optimize the transition from cloud-based semantic planning to edge-based fidelity refinement.
Introduction
The deployment of diffusion models is primarily hindered by their iterative denoising process, often requiring dozens of inference steps. Cloud-based inference provides high quality but suffers from queuing delays and high operational costs. Conversely, edge-based inference on mobile devices is private and fast but typically relies on lightweight models that produce structural anomalies or "semantic ambiguity."
EC-Diff bridges this gap by partitioning the generation process. The cloud handles the initial, computationally intensive "semantic" steps, while the edge device completes the "fidelity" refinement. This collaboration leverages the strengths of both environments while mitigating their respective weaknesses.
Proposed Method: EC-Diff
K-Step Noise Approximation Strategy
A key innovation in EC-Diff is the observation that noise predictions in diffusion models follow predictable trajectories across consecutive steps. The authors proved that these models can tolerate a certain amount of error (up to 0.5% Gaussian noise) at each step without altering the final output. EC-Diff exploits this tolerance through a K-Step Noise Approximation strategy.
The system calculates "noise gradients" to estimate noise for subsequent steps rather than running a full model inference. To prevent error accumulation, the cloud model periodically performs a full inference for error correction. A smoothing factor (α) ensures that these corrections do not introduce visual artifacts. This approach allows for significant computational savings in the cloud by skipping heavy inference steps during the stable "fidelity" phase of generation.
Two-Stage Greedy Search
Optimizing the collaborative process requires balancing three parameters: the approximation interval (k), the smoothing factor (α), and the handoff step (s) where the process moves from cloud to edge. EC-Diff utilizes a two-stage greedy search algorithm:
- Cloud Optimization: Determines the best k and α to maintain a stable semantic layout.
- Handoff Optimization: Identifies the optimal step s to maximize inference speed while maintaining a target Structural Similarity Index (SSIM).
Experimental Evaluation
The framework was evaluated on text-to-image (T2I) tasks using MS-COCO 2014 and text-to-video (T2V) tasks using the VBench suite. Cloud models included SDXL-base and CogVideoX-5B, while edge models included SSD-1B and BK-SDM.
Key Results
- Performance: EC-Diff achieved an average 2× speedup, reaching up to 2.5× compared to standard cloud-only inference.
- Quality: In video generation, EC-Diff maintained a VBench score of 81.54, nearly identical to the full CogVideoX cloud model.
- Robustness: Qualitative analysis demonstrates that EC-Diff successfully avoids the mangled structures and artifacts common in other fast-inference or hybrid methods.
Conclusion
EC-Diff demonstrates that edge-cloud collaboration, when optimized with noise approximation and intelligent handoff strategies, can significantly accelerate diffusion models without sacrificing the high quality expected from large-scale models. Future work will explore combining EC-Diff with model distillation techniques to further enhance real-time performance on mobile hardware.
Summary updated