Demo: WasmSD-Edge: A Lightweight Edge Stable Diffusion Image Generation Framework Based on WebAssembly
作者:Rouyi Wang, Zhi Zhou, Xu Chen · 年份:2025 · DOI:10.1145/3680207.3765593 · 被引用次数:1 · 研究领域:Cell Image Analysis Techniques、Advanced Neural Network Applications、Generative Adversarial Networks and Image Synthesis
The growing demand for deploying Artificial Intelligence Generated Content (AIGC) models like Stable Diffusion on resource-constrained edge devices challenges balancing quality, lightweight implementation, and portability. The emergence of WebAssembly (WASM) offers a compactcross-platform, and isolated runtime environment, making it a promising solution for efficient edge AIGC inference. However, current WASM based AI inference solutions are restricted to text interactions, offering limited support for image generation. To solve the challenges, we propose WebAssembly-Rust based WasmSD-Edge, a lightweight, edge-oriented AI image generation framework for high performance on-device Stable Diffusion inference on various edge devices. WasmSD-Edge employs a plugin-based architecture by integrating stable-diffusion.cpp as a WASM backend plugin for the WasmEdge runtime. It exposes a set of WebAssembly System Interfaces (WASI) to support text-to-image, image-to-image, and model convertion. Additionally, a Rust Crate SDK further enables developers to parametrically control inference process and output generation. To evaluate usability and portability of WasmSD-Edge on heterogeneous devices, we deployed it on heterogeneous devices. It achieves high inference speed and image quality with low resource consumption, offering a practical and efficient solution for deploying edge AIGC workflow. The implementation has been merged into WasmEdge — one of the largest WASM community, and source co...