A lightweight Vue + Vite web UI for stable-diffusion.cpp servers that expose the native sdcpp API.
It is designed for two use cases:
- run as a standalone frontend during local development
- build into a single HTML file that can be embedded into
sd-server
sdcpp-webui talks directly to the native server endpoints:
GET /sdcpp/v1/capabilitiesPOST /sdcpp/v1/img_genGET /sdcpp/v1/jobs/:idPOST /sdcpp/v1/jobs/:id/cancel
The current UI supports:
- prompt and negative prompt editing
- width, height, batch count, and seed
- sampler and scheduler selection
- guidance controls
- conditioning controls such as
clip_skip,strength, andcontrol_strength - LoRA selection from server capabilities
- init image, mask image, control image, and reference images
- VAE tiling controls
- cache controls
- job polling, cancellation, and output preview
- Node.js
>= 20 pnpm>= 10- a running
stable-diffusion.cppserver with thesdcppAPI enabled
Install dependencies:
pnpm installStart the dev server:
pnpm devThen open the Vite URL shown in the terminal.
The UI lets you set the backend base URL in the Settings tab.
If left empty, requests go to the current origin.
Build a production bundle:
pnpm buildThis project uses vite-plugin-singlefile, so the output is emitted as a self-contained dist/index.html.
Preview the production build locally:
pnpm previewIf you want to ship the UI inside stable-diffusion.cpp, first build the frontend:
pnpm buildThen generate the C header:
pnpm build:headerThat produces:
dist/gen_index_html.h
The generated header contains the built HTML as a byte array, which can be compiled into the server binary.
Run:
pnpm type-checksrc/
components/ reusable UI pieces
lib/ API, form mapping, image helpers, settings helpers
App.vue main application shell
main.ts app entry
styles.css global styles
scripts/
build_gen_index_html.js
- This UI is intentionally thin. Most selectable options come from the server's
capabilitiesresponse. - It assumes the backend handles CORS correctly if the frontend is served from a different origin.
- It is scoped to the native
sdcppAPI, not the OpenAI-compatible routes and not the A1111-compatiblesdapiroutes.
MIT License