A ridiculously fast, purely local Stable Diffusion GUI running directly on C++. No Python bloat, no Anaconda nonsense, no Windows tears. Just raw C++ powering your Linux GPU.
π§ Note on this Fork: This repository is a native Linux-only fork of the original Windows-centric techjarves/Local-AI-Image-Generator.
The original codebase was a Windows slave. We brought out the whip and domesticated it for Linux:
- 100% Native Linux: No Wine, no WSL gymnastics.
- Automated CUDA & Vulkan Compilation: If you have an Nvidia card,
./setup.shautomatically compilesstable-diffusion.cppwith native CUDA acceleration on first run. If you are on AMD/Intel or want maximum portability, the repo also supports full Vulkan build-chains. - True LAN Party Capabilities: The server listens on
0.0.0.0and the React frontend dynamically grabs the API route viawindow.location.hostname. You can let your heavy GPU sweat in the basement while generating images.
You'll need the usual tools for some hot C++ action. On Debian/Ubuntu-based systems:
sudo apt update
sudo apt install build-essential cmake nodejs npm
# And of course, a working CUDA Toolkit (nvcc must be in your PATH!)Let the script do the dirty work:
chmod +x start.sh setup.sh
./start.shThe script verifies your CUDA environment, clones and compiles stable-diffusion.cpp in the background, builds the frontend, and boots up the web server.
We support .safetensors and .gguf weights (SD 1.5, SDXL, etc.).
- Just drop your weights into
app/models/ - Or use the integrated Model Manager in the Web UI to download models directly via Hugging Face URLs.
For multi-file models like Flux (e.g. flux1-dev-Q5_0.gguf), the raw weights are not enough. The backend requires separate components like VAE and Text-Encoders.
Simply place them into the folder app/models/components/:
- VAE / Autoencoder:
ae.safetensors(orae.gguf) - CLIP-L Text-Encoder:
clip_l.safetensors(orclip_l-f16.gguf) - T5XXL Text-Encoder:
t5xxl.safetensors(e.g. the stablet5xxl_fp8_e4m3fn.safetensorsversion)
Once these files are present, the system will automatically detect them when loading a Flux model and start the C++ server with the correct --diffusion-model, --clip_l, --t5xxl, and --vae flags.
π‘ Tip: You can download all required components automatically using the provided bash script:
chmod +x download_flux_components.sh ./download_flux_components.shThis script will fetch and place the VAE, CLIP-L, and the stable FP8 Safetensors T5XXL Text Encoder into the correct folder, with resume capability. This avoids mathematical NaNs in stable-diffusion.cpp that lead to blank/white images.
If you are not running on Nvidia CUDA, you can compile and use the Vulkan backend instead:
# Compile the Vulkan backend binary manually
cmake -B build-vulkan -DSD_VULKAN=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-vulkan --config Release -j$(nproc)
# Move the compiled server to the Linux backends folder
cp build-vulkan/bin/sd-server app/backend/linux/sd-vulkanOnce the sd-vulkan binary is present in app/backend/linux/, the Model Manager and generation engine will automatically detect it and let you select the Vulkan GPU backend in the Web UI.
Open your browser at:
http://localhost:1420 (or your Linux server's IP within the LAN)
local-ai-image-generator/
βββ start.sh # Main Linux entry point
βββ setup.sh # Fresh & crisp backend compilation
βββ scripts/
β βββ serve.cjs # Static Node.js file & process manager
βββ app/
βββ frontend/ # React Frontend (Vite)
βββ models/ # Where your models sleep (.safetensors, .gguf)
βββ outputs/ # Where the hot results land (.png & .json Metadata)
Since we build directly on top of C++ (stable-diffusion.cpp), VRAM consumption is kept strictly on a leash.
- CUDA GPU (e.g., RTX 3060): Generates a 512x512 image (20 steps) in about 10 seconds.
- Vulkan GPU (AMD / Intel fallback): Outstanding multi-platform hardware acceleration, automatically used if
sd-vulkanis present and selected. - CPU Fallback: If you don't have a GPU (why do you even do this to yourself?), it will run painfully slow on CPU cores. Get CUDA or Vulkan.
This repository is licensed under the MIT License. It uses stable-diffusion.cpp as its backend.