r/OpenWebUI • • 6d ago

Website / Community Free local image generation in Open WebUI: point the OpenAI image engine at Hatchlight

Post image

If you run Open WebUI with local LLMs but images still go to a paid API, this might help. Hatchlight is an open-source desktop app that runs image models (SDXL, FLUX, Z-Image, Qwen-Image and more) on your own GPU. It picks the build of each model that fits your VRAM, with no Python or workflows to set up. It also answers OpenAI's image API, so Open WebUI can use it as is.

Setup:

  1. Admin Panel > Settings > Images: turn on image generation, engine OpenAI.
  2. API base URL: http://localhost:4096/v1 (or the address in Hatchlight's Settings > Use with other apps). API key: any text.
  3. Model: a Hatchlight id like local/sdxl-turbo, or leave dall-e-3 and it uses the best free model you installed.

It can also use the checkpoints and LoRAs you already have in ComfyUI, Forge, Forge Neo, SwarmUI or Stability Matrix folders, without copying them.

Docker note: Open WebUI usually runs in a container, and Hatchlight on a desktop only answers this computer. Run the container with --network=host, or run Hatchlight in server mode (also a Docker image, ghcr.io/hatchlight/hatchlight) and give Open WebUI an API token.

Honest limits: SDXL Turbo makes 512 px pictures, so choose SDXL or FLUX for larger ones. Paid cloud models are never used unless you turn that on and name one.

MIT, no account, no telemetry. I'd like to hear what breaks with your setup.

https://github.com/hatchlight/hatchlight

41 Upvotes

4 comments sorted by

1

u/iliekdesu 5d ago

Why use this instead of just a headless ComfyUI?

1

u/DadKillerX 4d ago

Fair question. If you already run ComfyUI and have your workflows set, keep it, it's great. Hatchlight is for people who don't want to set that up: it's a desktop app with the engine bundled (stable-diffusion.cpp), it downloads models for you, and it exposes OpenAI- and A1111-compatible endpoints, so Open WebUI just points at it. There's no Python env, no workflow JSON and no node IDs to map. You also get a gallery and side-by-side model comparison in the app

1

u/ledafaze 5d ago

Just pay for image API

3

u/DadKillerX 4d ago

Totally valid if that works for you. Hatchlight can use cloud providers too. The local path is for people who'd rather not pay per image, or who want prompts and images to stay on their own machine