local-image-generator
An Obsidian plugin that generates images without ever leaving the note: prompt into the sidebar, press Generate, and the image lands as a file in the vault or as a result note with the complete recipe in its frontmatter — prompt, seed, steps, model. Everything is computed on your own hardware. No cloud, no account, no image that leaves the device.
In the Obsidian Community Store since August 2026.
Why this one
Notes keep thinking in images: an I Ching oracle wants to see its scene, a worldbuilding project its places. Until now that meant, every time: start other software, generate the image, find the file, drag it into the vault, forget the prompt. The last part is the most annoying — an image without its recipe cannot be varied, only guessed at again.
The bet that seemed lost
The first version went all in: the diffusion model was to live inside the note app. SD-Turbo over WebGPU, a hand-written pipeline of tokenizer, scheduler and three ONNX sessions, the model downloaded once, 2.5 GB, into the local cache. No server, no process alongside. It worked — the first clean sumi-e apple came out in July 2026.
And it was discarded anyway. For two reasons, both of which only became visible once the thing was running:
The bundle. For a store plugin not to load anything at runtime, the WebAssembly runtime has to ship with it. The result was a 34-megabyte plugin file — in an ecosystem where plugins are measured in kilobytes, not a side detail but the wrong object.
The controls lied. SD-Turbo is distilled to one to four steps and trained without classifier-free guidance. A negative-prompt field next to it would have promised something the model cannot do at all. Better no control than a dummy — so there was none. Which meant the plugin lacked exactly the two knobs you reach for first when making images.
What came of it
The second version reverses the direction: the plugin no longer computes anything itself, it talks to an image server that is already running on the machine anyway — Draw Things, AUTOMATIC1111, Forge, SD.Next. Their shared HTTP interface is the seam.
Giving that up buys three things:
- 40 kilobytes instead of 34 megabytes. A check script holds the limit and raises the alarm if a runtime ever creeps back into the bundle.
- Honest controls. Negative prompt and guidance strength work now, because the models behind them can do it. Measured, not claimed: with the same seed, two runs are pixel-identical, and a negative prompt demonstrably changes the image.
- Free choice of model. Which model computes is decided by the server app. The plugin only asks what it is called and writes the name into the recipe.
What remains: everything still runs on your own hardware. "No server" became "your server" — the privacy promise is the same, the price for it is one more installation.
And then the engine came back
Giving it up had an uncomfortable flip side: whoever installed the plugin faced homework. First set up an image server, then make images. For a tool that is supposed to "just be there", that is the wrong first minute.
The assumption that forced this was: A store plugin must not load anything at runtime. It was never up for debate — it simply sounded right. It was only measured later, against the public review reports of other plugins: loading at runtime costs one recommendation line in the store rating and nothing else. No deduction, no warning.
So the old bet was not lost, it was wrongly framed. The engine was not the problem; shipping it was. Since version 0.6 there are both:
- Built-in, as the default: SD-Turbo computes directly in the app. The model only arrives after a click — until then not a single byte flows. What is downloaded is checked against a checksum.
- Server, for anything bigger: the same interface as before, full controls, free choice of model.
The rule from back then still applies, only stricter: what a mode cannot do is not shown. In built-in mode, the negative prompt and guidance control are missing entirely — not greyed out, not with an explanatory text, simply gone. A test run against the live app measures this after every change, in both directions.
Starting from an image
Since version 0.8 an image no longer has to start from zero. You pick a source image from the vault — or turn the result that has just been made into the new source image with one click — and set how far the model may move away from it. "Again, but different" becomes a slider instead of a new prompt.
The result note records where the image came from: a link to the source image, plus the denoising strength. That keeps the second generation traceable too — and variable.
Built-in mode cannot do this; it lacks the image part of the model that could read in an existing image. So the row is not there, by the same rule as above.
The lesson, if there is one
The first version was not a failure but the only way to find out what the thing costs. You can work out in advance that an embedded WASM runtime is large. That it is too large you only notice once you hold it in your hand — and that the missing controls were the actual problem, only once someone reaches for them.
The second lesson came later and is the more uncomfortable one: The most expensive assumption was the one nobody checked. "A store plugin loads nothing at runtime" took a working solution out of the race for half a year — and the check that brought it back was an afternoon of reading publicly available reports. It is not the building that is expensive, but the unchecked ruling-out.
Repository
github.com/johannes-kaindl/local-image-generator · AGPL-3.0 · Technical reference and setup in the README.