Skip to content

Image generation

Pluma talks to two image backends, both via their HTTP APIs:

  • A1111 (Stable Diffusion web UI) via /sdapi/v1/txt2img
  • ComfyUI via its /prompt API with a workflow JSON

The in-chat wand button derives the SD prompt from the last few conversation turns.

Set up a backend

A1111

Start A1111 with --api so it exposes the HTTP API:

./webui.sh --api

It serves on http://127.0.0.1:7860 by default.

In Pluma: Settings → Images → Auto-detect. Pluma probes 7860 and creates a profile. Or click + A1111 to add one manually.

ComfyUI

Start ComfyUI normally; it serves on http://127.0.0.1:8188.

In Pluma: Settings → Images → Auto-detect (probes 8188). Or + ComfyUI for manual entry.

ComfyUI needs a workflow JSON. The format is the same one ComfyUI's UI exports. Pluma's %placeholder% substitution convention matches what SillyTavern uses, so existing ST workflows drop in unchanged.

Workflow library

<datadir>/workflows/ holds workflow JSONs you can pick from the dropdown when configuring a ComfyUI profile. Pluma ships flat-anime-portrait on first run.

To add your own:

  1. Export a workflow from ComfyUI's UI (Save As → JSON).
  2. Drop the file into <datadir>/workflows/.
  3. Refresh the workflow dropdown in the image profile editor.

Pasted multi-line prompts auto-normalise so workflows exported from the ComfyUI UI drop in directly without manual escaping.

Placeholders

Workflow JSONs reference these placeholders. Pluma substitutes them at generation time.

Placeholder Replaced with
%prompt% The SD prompt (composer wand-button derivation OR explicit input).
%negative_prompt% The negative prompt (server-side floor adds anti-realism / anti-crop negatives even when the workflow's negative encode is bare).
%char_avatar% Active character's avatar (for img2img workflows). Only present in chat-derived generations.
%seed%, %steps%, %cfg%, %sampler% Override-able knobs from the profile.
%width%, %height% Output dimensions.

In-chat wand button

The composer's wand icon shows up when an SD profile is active. Click it to:

  1. Derive an SD prompt from the last few chat turns.
  2. Generate against the active workflow.
  3. Drop the result into the conversation as an attachment.

Generation status streams to the composer; click again to cancel.

Test from settings

The image-profile editor has a Try it input. Type a prompt, click Generate test image, and Pluma runs the workflow once. Useful for verifying connection + workflow without going through the chat path.

Preview generates without a character avatar; workflows that need %char_avatar% only run from inside a chat.