File size: 2,739 Bytes
a170e75 efbe184 6d3cc43 efbe184 b16e90e efbe184 b16e90e efbe184 b16e90e 13fc01d efbe184 b16e90e 13fc01d b16e90e 13fc01d b16e90e efbe184 6773f9d efbe184 d9bb81a efbe184 1c436bb 3818727 efbe184 6773f9d f714090 efbe184 8de940e efbe184 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | ---
license: mit
---
## diffusion
image/video generation GUI for GGUF diffusion models, packaged for Python.
The GUI runs in your browser against a local server; generation is done by
the diffusion (c/c++) engine, compiled during `pip install` and bundled
with the package as a single binary. Model and image files are referenced
by filesystem path through a built-in file browser — nothing is uploaded
or copied to temp storage.
## install via pip/pip3
```bash
pip install gguf-diffusion
```
## build it from source code
CUDA (NVIDIA)
```bash
$env:CMAKE_ARGS="-DSD_CUDA=ON"
pip install gguf_diffusion-x.x.x.tar.gz
```
ROCm/HIP (AMD)
```bash
$env:CMAKE_ARGS="-DSD_HIPBLAS=ON"
pip install gguf_diffusion-x.x.x.tar.gz
```
macOS/Metal (Apple)
```bash
pip install gguf_diffusion-x.x.x.tar.gz
```
## usage
enter GUI diffusion panel
```bash
gguf-diffusion
```

GUI features (similar to the gguf desktop app's diffusion panel):
- txt2img with the full model stack: `--model` / `--diffusion-model`, VAE,
external text encoders (`--clip_l`, `--t5xxl`, `--llm`, …), additional
models (ControlNet, TAESD, upscaler, PhotoMaker, …), tokenizer packs
- image inputs: init image (img2img), mask (inpainting), end frame,
control image, reference images
- sampling controls: CFG scale, steps, size, seed, batch count, all engine
sampling methods and schedules, flash attention, low-VRAM flags
- live progress and engine log, output gallery, saved workflows
(localStorage + JSON export/import), copyable/editable CLI command
use CLI call the engine straight in terminal/console
```
gguf-diffusion engine -- --diffusion-model model.gguf --clip_l clip_l.gguf --clip_g clip_g.gguf --t5xxl t5xxl.gguf --vae vae.gguf -H 512 -W 512 -p 'a lovely cat holding a sign says GGUF' --steps 8 --cfg-scale 1 --sampling-method euler -v --clip-on-cpu -o out.png
```
## how it works
- `pip install` compiles the diffusion.cpp engine (static libdiffusion +
static ggml linked into one CLI executable) via scikit-build-core and
installs it into the package's `bin/` directory.
- `gguf-diffusion` starts a stdlib HTTP server (default port 8643) serving
the static GUI and a small JSON API, and opens the browser.
- Each generation spawns one engine process; the server parses its progress
bars, streams the log to the GUI, and lists the produced images.
- File selection uses a server-side directory listing (`/api/browse`) so the
GUI gets real filesystem paths — no drag & drop uploads of multi-GB models.
or run it with `gguf-connector`
```
ggc fu
```
 |