I’ve been experimenting with running AI models locally, exploring different ways to make AI more accessible without depending on cloud services or dedicated AI servers.
My latest project, Small X Studio, takes that experimentation in a different direction: running an AI image generation model directly inside a web browser.
I was inspired by this project https://webllm.mlc.ai/ which allows you to chat with an an agent locally.
Small X Studio is a self-hosted text-to-image application built using .NET 10, JavaScript, ONNX Runtime Web, and Stable Diffusion.
Unlike traditional AI image generation applications, where your browser sends requests to a back-end running the AI model, Small X Studio performs the actual image generation locally in the browser.
The .NET application serves the website and model files. Once the browser loads the model, the image generation process happens entirely on your device.
This means:
- No cloud AI inference service is required.
- No dedicated GPU server is needed.
- Prompts and image generation remain local to the browser.
- The application can take advantage of supported GPU hardware through WebGPU.
- CPU-based execution is available as a fallback.
- The entire application can be self-hosted using Docker.
Code: https://github.com/xavier-hernandez/small-x-studio
Demo/Test Website: https://small-studio.xavier.cc/