Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local WebGPU Image Studio

A normal Flask application adapted from d0grr/generate-ai-images. Flask serves the interface and local ONNX files; all image inference runs client-side through ONNX Runtime Web's WebGPU execution provider. There is no server inference and no CPU fallback.

Run

.\.venv\Scripts\Activate.ps1
python app.py

Open http://127.0.0.1:5000 in a WebGPU-capable Chrome or Edge browser. The resolution dropdown supports 256×256, 512×512, 768×768, and 1024×1024.

Configuration is stored in .env.

Download local models

Model weights are intentionally not stored in Git. Download both required local WebGPU variants after cloning:

.\.venv\Scripts\python.exe scripts\download_models.py

The downloader is resumable and needs approximately 8.74 GB of free disk space. It downloads from:

  • d0gr/sdxl-lightning-onnx-webgpu
  • d0gr/sdxl-lightning-onnx-webgpu-int4

Files are written exactly here:

models/
  quality/
    tokenizer/
    tokenizer_2/
    text_encoder/
    text_encoder_2/
    unet/
    vae_decoder/
  light/
    unet/

Run the same command again after an interrupted download; existing completed files are skipped and .part files resume. Start Flask only after the script prints All local WebGPU models downloaded.

The first generation compiles WebGPU shaders and can take substantially longer than later generations. SDXL Quality requires roughly 8 GB of VRAM; the int4 Light model requires Chrome and roughly 6 GB.

About

Local Flask SDXL image generation with browser-only WebGPU inference

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages