An LM Studio plugin that illustrates the model's chat replies with pictures from a PixlStash server. The model decides when to illustrate by calling a single tool; the plugin runs the semantic search, downloads a matching picture, and renders it inline in the assistant's reply.

model.act() with one tool: show_pixlstash_image.GET /api/v1/pictures/search), filters to
renderable formats, picks one of the top-N results that hasn't already been
shown in this chat, downloads it into the chat working directory, optionally
downscales it to a max height, and writes a markdown image into its own
assistant content block.src is a local file in the chat working directory.The model never has to echo any markdown — the plugin renders the image itself — so this works with roleplay fine-tunes that won't repeat tool results.


lms CLI ships with the app — make
sure it's on your PATH, usually at ~/.lmstudio/bin).Browse to pixlstash-lmstudio on the LM Studio Hub, or pull it via the CLI:
The plugin will appear in LM Studio's plugin list. Open the plugin's gear
icon and fill in the PixlStash base URL + your READ share token (and turn on
Ignore HTTPS certificate errors if your PixlStash uses a self-signed cert).
That's it — start a chat and the model can now call show_pixlstash_image.
Running the plugin from source, the project layout, and publishing instructions live in CONTRIBUTING.md.

Global (plugin gear icon, shared across all chats):
| Setting | Default | What it does |
|---|---|---|
| PixlStash base URL | http://localhost:9537 | Where PixlStash lives. Use https://… for TLS. |
| READ share token | (empty) | A READ-scoped token from PixlStash → User Settings → Tokens. |
| Ignore HTTPS certificate errors | off | Accept self-signed certs (local servers only). |
Per chat (per-conversation settings panel):
| Setting | Default | What it does |
|---|---|---|
| Pick from top N results | 10 | Random pool size for each search. |
| Minimum semantic score | 0.5 | PixlStash search threshold. |
| Image to inject | Full | Full image vs. 256×256 thumbnail. |
| Max image height (px) | 512 | Downscale taller full-mode images (0 = no resize). |
| Max images per response | 1 | Hard cap on tool calls per reply (0 = unlimited). |
| Allowed formats | jpg/jpeg/png/webp | Restrict to LM Studio-renderable formats. |
| Required / excluded tags | — | Tag-based include/exclude filters. |
| Minimum user score | 0 | PixlStash per-picture rating floor. |
| Limit to characters / sets / project | — | Scope the search to specific PixlStash entities by name. |
The plugin works best when your system prompt mentions the tool — for example:
When a visual would help illustrate a scene, character, or object, call
show_pixlstash_imagewith a short, vivid description. You don't need to repeat any markdown; just narrate around it.
Bug reports, feature requests, and pull requests welcome — see CONTRIBUTING.md for the dev setup, project layout, and publishing workflow.
MIT © Pikselkroken
lms clone pikselkroken/pixlstash-lmstudio