# Swarm Assistent SwarmUI extension for **collaborative Krea 2** prompting via **Ollama**: chat + board (Generate | Refs tabs), LoRA chips, personas, model cards with Civitai fetch, img2img/inpaint, slash commands, auto Generate. **Version 0.6.0** — board tabs, Cards form + live Civitai meta, Interrupt cancel, slim history, LoRA chips, Turbo/RAW, taste on disk, RU UI. ## Layout - **Left — Board tabs:** **Generate** (full-height live view) | **Refs** (reference grid + badge `N · vision M`) - **Splitter:** drag to resize panes - **Right:** Chat | Cards; persona / pack / Ollama model; settings gear - **Chips:** aspect, Seed lock/−1, Vary, Turbo/RAW; LoRA chip row under them - Slash autocomplete when the composer starts with `/` ## UX - **Send to Assistent** under Generate/History → Ref + Assistent tab - Drop on Generate → new Ref + switch to Refs tab - **As Init** / **As Mask** / **Clear Init** - Enter sends; Shift+Enter newline; Interrupt cancels chat epoch (no late auto-apply) - Manual **Apply + Generate** / `/gen` always generate; Auto-generate checkbox only for LLM auto-path - Auto-critique rewrites prompt only (no second Generate) - Civitai Confirm required (unless auto-download) - Cards: form fields + previews; **Load Civitai meta** fetches by SHA (`by-hash`); status always explicit ### Slash commands (client-side, no LLM) | Command | Effect | | --- | --- | | `/help` | List commands | | `/gen` | Generate now | | `/look generate\|refN` | Attach that board window + ask the LLM to look | | `/init` `/mask` `/clear` | Same as board buttons | | `/interrupt` | Stop generation / cancel chat | | `/aspect 16:9` | Set size from the official 1K table | | `/seed lock\|random` | Lock or randomize seed | | `/vary` | New seed, same prompt (+ generate if auto) | | `/pack write\|critique\|compose\|params\|inpaint\|describe\|card` | Switch pack | | `/civitai ` | Ask LLM to search Civitai (Confirm still required) | | `/inventory` | Rescan models + refresh LoRA list | ## Requirements - SwarmUI with a **Krea 2** checkpoint selected - Ollama on `http://127.0.0.1:11434` **on the GPU VM** (gpu-rent `LLM_RUNTIME=ollama`) - At least one pulled model - Optional: Civitai API key in SwarmUI User Settings ## Install ```yaml swarmui: - url: https://gitea.hsrv.site/mrleo1nid/swarm-assistent.git ref: main dir: swarm-assistent requires: ollama ``` Restart / rebuild SwarmUI after clone. gpu-rent: `seed-extensions` + restart. ## Prompt packs | Pack | Role | | --- | --- | | `base_krea2` | Always injected | | `write_prompt` | Craft / improve prompts | | `critique_image` | Vision critique | | `compose_scene` | Scene via board refs | | `fix_params` | Aspect / steps / CFG / seed (`krea_profile` in live context) | | `inpaint_edit` | Init + Mask | | `describe_ref` | Vision → prompt | | `catalog_card` | Recommendation card JSON | **Personas:** `neutral`, `lewd`, `aggressive`, `cinema`, `terse`. Overlay: `/mnt/swarm_data/Assistent/personas.json` (gpu-rent seeds from `assistent-personas.yaml` → yaml + json). Assistent reads **json** only. **Taste:** `/mnt/swarm_data/Assistent/taste.json` via `AssistentGetTaste` / `AssistentSaveTaste` (merged with browser localStorage by `updated`). **Cards:** `{stem}.assistent.json` next to weights; Civitai sidecar `{stem}.civitai.json`. Wanted queue → `.gpu-rent-wanted-models.yaml`. ## API routes | Route | Role | | --- | --- | | `AssistentListModels` | Ollama `/api/tags` | | `AssistentListInventory` | LoRA / checkpoint / wildcard inventory | | `AssistentListPersonas` | Bundled + overlay personas | | `AssistentGetPacks` | Prompt pack texts | | `AssistentGetCard` / `AssistentSaveCard` | `.assistent.json` cards | | `AssistentGetCardMeta` | Local sidecar + optional `fetch=true` Civitai by-hash | | `AssistentEnqueueWanted` | Wanted YAML queue | | `AssistentGetTaste` / `AssistentSaveTaste` | Persistent taste profile | | `AssistentSearchCivitai` | Civitai LoRA search | | `AssistentChat` | HTTP chat (+ Civitai hop) | | `AssistentChatWS` | Streaming chat WebSocket | ## License MIT