An offline, high-quality image generator with a clean web UI.
Type a prompt, pick a preset, generate. No accounts, no cloud, no fuss.
Free GPU · nothing to install. Open the notebook, then Runtime ▸ Run all, and click the link it prints.
DedrisGenAI is a desktop image generator that runs entirely on your own machine. It pairs a lightweight PHP web UI with a powerful Python + PyTorch generation engine, and ships with portable launchers so there is nothing to install system-wide — double-click one file and your browser opens to the app.
The engine is built on a proven, high-performance image-generation pipeline, re-architected around a local HTTP API and a modern PHP front end.
- Three curated presets — Standard, Anime, and Realistic — tuned for great results out of the box.
- Prompt-first workflow — high-quality text-to-image without heavy prompt engineering or knob-twiddling.
- Built-in prompt expansion — the "DedrisGenAI V2" style enriches short prompts automatically.
- Full control when you want it — base/refiner models, up to 5 LoRAs, CFG/guidance, sharpness, sampler, scheduler, steps, VAE, CLIP skip, aspect ratio, seed, and output format (PNG/JPEG/WebP).
- Image-input tools — Upscale/Vary, Image Prompt, Inpaint/Outpaint, Describe, Enhance, and Metadata.
- Live results — gallery output with a real-time progress bar and preview.
- Runs offline — generation happens locally; the browser only ever talks to a local PHP server.
- Cross-platform launchers — Windows (NVIDIA CUDA) and macOS (Apple Silicon / MPS).
| Preset | Best for | Selector label |
|---|---|---|
| Standard | General-purpose, versatile image generation | Standard |
| Anime | Stylized, illustrative, anime-style art | Anime |
| Realistic | Photographic, lifelike results | Realistic |
Each preset bundles its own default model, styles, sampler, scheduler, CFG, sharpness, and aspect
ratio. You can switch presets at any time in the UI, and override any individual setting per
generation. Presets live in engine/presets/ (default.json = Standard, anime.json, realistic.json).
You do not need to install Python, PyTorch, or PHP yourself. The launcher provisions a portable
runtime on first run (this first run downloads several GB and can take a while), then starts both
services and opens your browser at http://127.0.0.1:8888.
- Make sure you have a recent NVIDIA GPU and up-to-date drivers.
- Double-click
run.batin the project root.- Or from a terminal:
.\run.bat
- Or from a terminal:
- Wait for the first-run provisioning to finish. Your browser opens to the app automatically.
The Windows launcher installs the CUDA build of PyTorch and runs the engine on your GPU.
- Make sure you are on an Apple Silicon Mac (M1/M2/M3 or newer).
- Double-click
start.commandin the project root.- Or from a terminal:
./start.command - If macOS blocks it the first time, run
chmod +x start.commandand try again, or right-click → Open to approve it in Gatekeeper.
- Or from a terminal:
- Wait for first-run provisioning. Your browser opens to the app automatically.
The macOS launcher uses PyTorch with Metal (MPS) acceleration and sets
PYTORCH_ENABLE_MPS_FALLBACK=1 for unsupported operations.
No local GPU? Run DedrisGenAI on a free Google Colab GPU:
The notebook installs PHP and the CUDA build of PyTorch, starts the engine and the PHP web UI, and
exposes the same PHP UI through Colab's built-in port proxy — so you get the full GPU-backed
DedrisGenAI experience in your browser, no install required. Set Runtime → Change runtime type →
GPU first, then run all cells and click the printed link. A cloudflared tunnel fallback is included
if the proxy link is blocked. See docs/COLAB.md for troubleshooting.
Ports: the UI runs on
127.0.0.1:8888and the engine on127.0.0.1:7866. Override with theDEDRIS_UI_PORTandDEDRIS_ENGINE_PORTenvironment variables.
DedrisGenAI is two cooperating local services:
- PHP web UI (
webui/) — serves the interface and exposes a set of PHP API endpoints. Your browser only ever talks to this PHP server (no CORS, the engine stays hidden). - Python engine (
engine/server.py) — an HTTP service wrapping the generation pipeline. It loads models once at startup and runs generation jobs.
The request flow is:
Browser → PHP UI (8888) → PHP proxy /api/* → Python engine (7866) → worker → images
The PHP api/* endpoints mirror the engine's /api/* endpoints 1:1 and simply forward JSON. See
docs/ARCHITECTURE.md for the full request flow and API reference.
For debugging, the engine can still be run the legacy way with python launch.py from inside
engine/.
DedrisGenAI/
├─ engine/ # Python generation engine; runs with CWD=engine/
│ ├─ modules/ # backend logic (worker, config, flags, styles, ...)
│ ├─ ldm_patched/ # diffusion backend
│ ├─ extras/ # BLIP, GroundingDINO, prompt expansion, etc.
│ ├─ presets/ # default.json (Standard), anime.json, realistic.json
│ ├─ sdxl_styles/ # style definitions
│ ├─ models/ # checkpoints, loras, vae, ... (downloaded on demand)
│ ├─ server.py # HTTP API the PHP UI calls
│ └─ launch.py # legacy entry point (debugging)
├─ webui/ # PHP web UI (replaces the old Gradio UI)
│ ├─ public/ # document root: index.php + assets/
│ ├─ api/ # PHP endpoints that proxy to the engine
│ └─ lib/ # PHP helpers (EngineClient, Config)
├─ runtimes/ # portable PHP + Python runtimes (provisioned on first run)
├─ launchers/ # shared bootstrap logic
├─ docs/ # documentation
├─ run.bat # entry point — Windows / NVIDIA CUDA
├─ start.command # entry point — macOS / MPS
└─ README.md # this file
A fuller explanation is in docs/STRUCTURE.md.
The launchers provision a portable runtime, so you don't install anything globally. You do need a capable machine:
| Platform | GPU / Acceleration | Notes |
|---|---|---|
| Windows | NVIDIA (CUDA) | 4GB+ VRAM, recent drivers. Use run.bat. |
| macOS | Apple Silicon (MPS) | M1/M2/M3+. Use start.command. Slower than a discrete NVIDIA GPU. |
Plenty of free disk space is recommended — the portable Python runtime, PyTorch, and the default
models together take several GB. See docs/troubleshoot.md for common
issues (system swap, model corruption, out-of-memory, etc.).
docs/STRUCTURE.md— folder layout explained.docs/ARCHITECTURE.md— request flow, API endpoints, where things live.docs/COLAB.md— running on Google Colab (GPU runtime, tunnel fallback, model download).docs/development.md— running tests and developing.docs/docker.md— running the engine in Docker.docs/troubleshoot.md— common problems and fixes.