|
|
3 달 전 | |
|---|---|---|
| .. | ||
| 404 | 3 달 전 | |
| _not-found | 3 달 전 | |
| app | 3 달 전 | |
| components | 3 달 전 | |
| contexts | 3 달 전 | |
| demo | 3 달 전 | |
| img2img | 3 달 전 | |
| inpainting | 3 달 전 | |
| lib | 3 달 전 | |
| public | 3 달 전 | |
| settings | 3 달 전 | |
| text2img | 3 달 전 | |
| upscaler | 3 달 전 | |
| .gitignore | 3 달 전 | |
| 404.html | 3 달 전 | |
| README.md | 3 달 전 | |
| STRUCTURE.md | 3 달 전 | |
| eslint.config.mjs | 3 달 전 | |
| favicon.ico | 3 달 전 | |
| file.svg | 3 달 전 | |
| globe.svg | 3 달 전 | |
| index.html | 3 달 전 | |
| index.txt | 3 달 전 | |
| next.config.ts | 3 달 전 | |
| next.svg | 3 달 전 | |
| package-lock.json | 3 달 전 | |
| package.json | 3 달 전 | |
| postcss.config.mjs | 3 달 전 | |
| tsconfig.json | 3 달 전 | |
| vercel.svg | 3 달 전 | |
| version.json | 3 달 전 | |
| window.svg | 3 달 전 | |
A modern, responsive web interface for the Stable Diffusion REST API, built with Next.js 15, React, TypeScript, and Tailwind CSS.
Install dependencies:
npm install
Configure the API endpoint:
Edit .env.local:
NEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_API_BASE_PATH=/api/v1
Run the development server:
npm run dev
Open http://localhost:3000 in your browser
# Build the application
npm run build
# Start the production server
npm start
webui/
├── app/ # Next.js App Router pages
│ ├── text2img/ # Text-to-image generation
│ ├── img2img/ # Image-to-image generation
│ ├── upscaler/ # Image upscaling
│ ├── models/ # Model management
│ ├── queue/ # Queue monitoring
│ ├── layout.tsx # Root layout with theme provider
│ ├── page.tsx # Home page
│ └── globals.css # Global styles and theme variables
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── input.tsx
│ │ ├── textarea.tsx
│ │ └── label.tsx
│ ├── header.tsx # Page header component
│ ├── sidebar.tsx # Navigation sidebar
│ ├── main-layout.tsx # Main layout wrapper
│ ├── theme-provider.tsx # Theme context provider
│ └── theme-toggle.tsx # Light/dark theme toggle
├── lib/ # Utilities and services
│ ├── api.ts # API client for backend communication
│ └── utils.ts # Helper functions
├── public/ # Static assets
├── .env.local # Environment variables (create this)
├── next.config.ts # Next.js configuration
├── tailwind.config.ts # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
Navigate to Model Management to:
The Queue Monitor page shows:
The web UI communicates with the Stable Diffusion REST API through the API client in lib/api.ts. All endpoints are type-safe with TypeScript interfaces.
POST /api/v1/text2img - Generate images from textPOST /api/v1/img2img - Transform imagesPOST /api/v1/generate - General generation endpointGET /api/v1/models - List all modelsPOST /api/v1/models/load - Load a modelPOST /api/v1/models/unload - Unload a modelPOST /api/v1/models/scan - Scan for new modelsGET /api/v1/queue - Get queue statusGET /api/v1/jobs/{id} - Get job statusDELETE /api/v1/jobs/{id} - Cancel a jobGET /api/v1/health - API health checkGET /api/v1/system - System informationEdit app/globals.css to customize theme colors using HSL values:
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
/* ... more colors */
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
/* ... more colors */
}
Change the API endpoint in .env.local:
NEXT_PUBLIC_API_URL=http://your-api-server:8080
NEXT_PUBLIC_API_BASE_PATH=/api/v1
npm run dev - Start development servernpm run build - Build for productionnpm start - Start production servernpm run lint - Run ESLint.env.local.next folder and node_modulesnpm install againContributions are welcome! Please feel free to submit issues or pull requests.
This project is part of the Stable Diffusion REST API server.