Repository avatar
AI Tools
v0.5.0
active

hatchlight

io.github.hatchlight/hatchlight

Make pictures and videos with the AI models on your own graphics card, or with your cloud keys.

Documentation

Hatchlight

Download · Getting started · Website · Contribute

CI OpenSSF Scorecard OpenSSF Best Practices hatchlight on npm Hatchlight MCP server on Glama

Hatchlight: one prompt sent to SDXL Turbo and Stable Diffusion XL on this computer, both pictures forming side by side, each with its time (the wait is sped up 7×, as the video says)

Make pictures and videos with many AI models, side by side. Run them on your own graphics card for free, or use the services you already pay for with your own keys. Open source, no account, no telemetry.

  • Compare models side by side. One prompt goes to several models, and each result shows its time and cost.
  • Learn which model you prefer. Pick the best result of a comparison, blind if you like, and Hatchlight ranks the models by your picks, with the median time and cost on your computer. Share the ranking as an image or Markdown.
  • Runs on your graphics card. Hatchlight looks at your computer, picks the version of each model that fits it, downloads and checks the files, and runs them. Free, private, and offline once downloaded.
  • Your own keys, no middleman. Cloud models are called straight from your computer with your key.
SDXL TurboStable Diffusion XLFLUX.1 schnellZ-Image Turbo
Fox by SDXL TurboFox by Stable Diffusion XLFox by FLUX.1 schnellFox by Z-Image Turbo

One prompt, four models, one RTX 4070 SUPER: "a red fox curled up in fresh snow, soft morning light".

What it does

Models on your computer. Picture and video models from the catalog, many of them in 16, 8 and 4 bit versions for different amounts of memory:

  • pictures: SDXL Turbo, Stable Diffusion XL and 1.5, FLUX.1 schnell, FLUX.2 klein, Z-Image, Qwen-Image, Chroma1, LongCat-Image, HiDream-O1, PixArt-Σ and more;
  • editing by instruction: Qwen-Image-Edit, LongCat-Image-Edit, FLUX.2 klein and more;
  • video: Wan 2.1 and Wan 2.2, from words or from a first frame;
  • Real-ESRGAN to upscale ×4.

Pictures sharpen on screen while they form. A model stays loaded between pictures, and several Hatchlight windows share one graphics card without running out of memory.

Models in the cloud, on your keys. fal, Replicate, OpenRouter, OpenAI and Google Gemini: FLUX, GPT Image, Nano Banana, Veo, Kling, Hailuo, Wan, Seedream, Runway and more. Each result shows what it cost.

Edit what you made. Any picture can be the reference for the next prompt or the first frame of a video. Change it a little or a lot, paint a mask and redraw only that part, make room around it, crop, turn or flip it, or upscale it.

Your own styles. Load LoRAs and your own SDXL or SD 1.5 checkpoints, or train an SDXL LoRA from your pictures: Hatchlight writes the captions, shows sample pictures while it learns, and lets you keep an earlier step. Already have models in ComfyUI, AUTOMATIC1111, Forge or Stability Matrix? Point Hatchlight at that folder and it uses them where they are, without copying.

An assistant. Talk to it in the Chat view: "make the fox bigger", "now in 16:9, with FLUX". It picks models, writes the prompts and makes the pictures. It can look at what came out and suggest a fix. The Advanced view shows the same session with every setting. It asks before anything paid and keeps to a spend limit. Write in your own language: each model gets the prompt in the words it understands, and Improve prompt turns a short idea into a detailed one.

Hatchlight: a chat with the assistant, showing three takes of a fox in the snow from three models on this computer

The Advanced view: next-prompt settings on the left, results per model in the middle, the chosen picture on the right

A gallery. Every result is saved on your computer with the prompt and settings that made it, and you can search it.

The gallery: every picture made, in a grid Hatchlight on a phone: the chat with a bottom bar

The interface speaks English and Brazilian Portuguese, works on phones and tablets as well as desktops, and can be used with the keyboard and a screen reader. More languages are welcome: see Translate.

Where it runs

SystemThe appModels on your computer
WindowsYesNVIDIA (CUDA), AMD (ROCm), other cards (Vulkan), CPU
macOS, Apple SiliconYesMetal
LinuxYesNVIDIA (CUDA), CPU
macOS, IntelYesNot yet: cloud models only for now

Under WSL on Windows, the Windows engines run.

About 8 GB of graphics card memory runs the quick models, such as SDXL Turbo; 4 to 6 GB runs Stable Diffusion 1.5 and the smallest version of Z-Image Turbo. With less, or no graphics card, cloud models still work. See Which model to start with.

Some parts need more:

  • training a LoRA needs Windows (or WSL) and an NVIDIA card with 12 GB of memory, and downloads about 6 GB of tools the first time;
  • prompt translation and Improve prompt run on your computer on Windows and WSL, and the local assistant only in the Windows app; elsewhere they can use a cloud key instead.

Install

Desktop app: download the installer for your system from the latest release. It updates itself when a new version comes out. The installers are not signed yet: if Windows or macOS warns you, Getting started says what to do. Signing the Windows installers through SignPath Foundation is being set up: see the code signing policy.

New to Hatchlight? Getting started walks you from the first picture to editing, styles of your own, and what to do when something goes wrong.

From source, with Bun 1.4 or newer:

git clone https://github.com/hatchlight/hatchlight.git && cd hatchlight
bun install
bun run build
bun run start

This opens http://localhost:4096. bun run start --help lists the options. Keys can also come from the environment: FAL_KEY, OPENAI_API_KEY, GEMINI_API_KEY, REPLICATE_API_TOKEN, OPENROUTER_API_KEY.

As a server for the people of your home or a small team, on a home server or NAS with an NVIDIA card: run the Docker image, with accounts and a private gallery for each person. See Self-hosting.

Use it from the terminal or an AI agent

The same program makes pictures from the command line, and lets agents that speak the Model Context Protocol, such as Claude Code or Claude Desktop, use your models. With Bun installed:

bunx hatchlight generate "a lighthouse at dusk" -m local/sdxl-turbo -o out/
claude mcp add hatchlight -- bunx hatchlight mcp

In the app, Settings > Use with AI agents connects Claude Desktop for you. Command line and agents covers every command, setting up from the terminal, and spending limits for agents.

Other apps can use your models too: Hatchlight answers OpenAI's image API and AUTOMATIC1111's, so Open WebUI, SillyTavern, LibreChat and scripts make pictures with it. See Use it from other apps.

Your data

Sessions, pictures and keys stay on your computer:

SystemDirectory
Windows%APPDATA%\hatchlight
macOS~/Library/Application Support/hatchlight
Linux$XDG_DATA_HOME/hatchlight or ~/.local/share/hatchlight

On Windows, models and the LoRA trainer live in %LOCALAPPDATA%\hatchlight. HATCHLIGHT_DATA_DIR or --data-dir puts the data elsewhere, and HATCHLIGHT_MODELS_DIR moves only the models; the app can also move them to another disk for you. Under WSL, models stay on the Windows side. The graphics card driver reads them fastest there. Installs made before the rename to Hatchlight keep using their open-reel folders and OPEN_REEL_* variables.

Keys are sent only to the provider they belong to and are never returned by the API. The server listens on 127.0.0.1 only and refuses requests that do not come from its own page, so other websites cannot use your keys. Nothing is collected about you: Hatchlight has no telemetry. Besides the providers you use, it only connects to the sites that host the models, the engines and their sample pictures, to PyTorch's and Python's package sites when you install the LoRA trainer, and to GitHub to check for updates.

Responsible use

You are responsible for what you make with Hatchlight. Do not make pictures of real people without their consent, and do not use it to deceive or harm anyone. Training a LoRA asks you to confirm that you may use the pictures.

Each model has its own license, set by its authors. The Models screen shows whether commercial use is allowed; SDXL Turbo, for example, is free for commercial use only under a yearly revenue limit. Check the license before you sell what you make.

Built with

The interface is React with shadcn/ui on Base UI for accessible components, prompt-kit for the chat, and Tailwind CSS. The server and the command line run on Bun; the desktop app is Tauri.

Contribute

Bug reports, translations, new providers and new local models are all welcome. CONTRIBUTING.md explains how the project is laid out, how to run it while developing, and what a pull request needs. Everyone taking part follows the code of conduct. To report a security problem, see SECURITY.md.

License

MIT. The models and engines the app downloads keep their own licenses: see THIRD_PARTY.md.

Code signing policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation. Who builds, reviews and approves what is signed, and what Hatchlight sends over the network: CODE_SIGNING_POLICY.md.

NPM
hatchlight
Install Command
npm install hatchlight
Runtime: bunx