Adds a README subsection for the inline LoRA stack (slot management, collapse state, skip-on-error semantics, list_loras endpoint) and a CHANGELOG [Unreleased] entry covering the new schema input, endpoint, and execute() behaviour.
Maxomarai Pack for ComfyUI
A small suite of ComfyUI tools by Maxomarai, designed to work together.
One repo, one install — two tools:
| Tool | What it does |
|---|---|
| The Last Model Switcher | One-click model switching with auto-configured CLIP/VAE/resolution/sampler, plus AI-powered model identification and prompt enhancement. |
| Wayfinder | Frontend-only visual aid: type-colored drag links, connected-node highlighting, breathing glow on palette-colored nodes. |
Install
Option 1 — Git clone (recommended for now)
cd ComfyUI/custom_nodes
git clone https://github.com/maxomarai/maxomarai-pack.git
Restart ComfyUI. Both tools activate on next browser load.
Option 2 — ComfyUI Manager
Open Manager → Install Custom Nodes → search for maxomarai-pack → Install. Restart ComfyUI.
Option 3 — ComfyUI Registry
comfy node registry-install maxomarai-pack
The Last Model Switcher
One node replaces the usual Load Checkpoint → CLIPTextEncode × 2 → EmptyLatentImage → KSampler plumbing. Pick a model; CLIP, VAE, resolution, and sampler settings auto-populate. Outputs are ready to wire directly into a KSampler and EmptyLatentImage.
Supports SDXL, SD 1.5, Flux 1 (Dev / Schnell), Flux 2, SD 3.5, Chroma, HunyuanVideo, and more — auto-detected from the safetensors tensor-key fingerprint.
Outputs
| Output | Wire to |
|---|---|
model |
KSampler |
vae |
VAE Decode |
positive |
KSampler (positive) — FluxGuidance is baked in for Flux models |
negative |
KSampler (negative) — empty for Flux, safe to keep connected |
width / height |
EmptyLatentImage |
steps / cfg |
KSampler |
seed |
KSampler |
AI features
TLMS ships with two AI-assisted flows. Configure the provider once in Settings (see below); the node calls it on demand.
-
🔎 Identify Model (Model toolbar): sends the model's filename + tensor-key fingerprint to the AI and receives suggested sampler / scheduler / steps / CFG / guidance / negative-prompt support. Shown as a diff preview in the info panel —
Applycommits topresets.json,Discardthrows it away. Nothing is saved without your confirmation. A warning appears when using local/custom providers or when AI confidence is low/medium, since smaller models can hallucinate settings. -
✨ Enhance Prompt (Prompt toolbar): rewrites the positive prompt in your chosen style (
enhance/detailed/concise/creative/fix) or per a custom instruction. Shown as a preview;✓ Applyreplaces the prompt, re-clickingEnhanceoverwrites the preview.
Supported providers:
| Provider | Needs API key | Notes |
|---|---|---|
| Anthropic (Claude) | ✓ | Get one at console.anthropic.com |
| OpenAI (GPT) | ✓ | Get one at platform.openai.com/api-keys |
| Ollama (local) | — | Default URL http://localhost:11434/v1/chat/completions. Run ollama serve and ollama pull <model> |
| Custom OpenAI-compatible | depends | LM Studio, vLLM, anything with /v1/chat/completions |
LoRA stack (inline)
Stack any number of LoRAs directly on the node — no separate LoRA-loader graph. Click the + in the LoRA header to add a slot; each slot has a filename combo, strength_model and strength_clip number inputs, and a trash button.
- Section is collapsed by default (chevron in the header); state persists per-browser in
localStorage["tlms.lorasExpanded"]. - Slots apply in order to the model/clip chain via
comfy.sd.load_lora_for_modelsbefore the node returns its outputs — upstream patches are preserved into prompt encoding and ModelSamplingFlux. - A missing file, an invalid strength, or a row with both strengths set to 0 is silently skipped — one bad LoRA won't kill the run.
- State is stored in a hidden
loras_jsonstring widget so workflow save/load round-trips unchanged. - Available filenames come from
GET /the_last_model_switcher/list_loras, which serves ComfyUI'sfolder_paths.get_filename_list("loras").
Toolbars on the node
Four compact pill-shaped segmented toolbars replace stacked full-width buttons:
- Model —
🔎 Identify · 📡 Scan - Prompt —
✨ Enhance · ✓ Apply · ⌄ Options · ⛶ Editor(Apply only appears when an enhanced prompt is pending; Options expandsenhance_style+enhance_instruction) - Seed —
🔀 Random · ↺ Reuse last - Admin —
⚙ Settings · 🔌 Test · 📄 Presets · ↻ Reload
Plus a LoRA section between the prompts and width/height, with its own header toolbar (chevron + slot counter + add). See above.
Editor
⛶ Editor opens a modal with big textareas for the positive and negative prompts, plus a read-only view of the info panel. Esc to cancel, Ctrl+Enter to save.
Settings
Exposed in ComfyUI Settings → Maxomarai → The Last Model Switcher:
| Setting | Type | Default | Purpose |
|---|---|---|---|
| AI Provider | combo | anthropic |
anthropic / openai / ollama / custom |
| AI Model | text | empty | Provider-specific model name — e.g. claude-haiku-4-5-20251001, gpt-4o-mini, qwen3:14b, llama3.2 |
| API Key | text | empty | Stored in plaintext in comfy.settings.json. Not needed for ollama/custom. |
| Base URL | text | empty | For ollama/custom. Default Ollama URL: http://localhost:11434/v1/chat/completions |
⚠️ Reasoning models (qwen3, deepseek-r1, qwq) work but consume many tokens on internal "thinking" before producing the JSON response. TLMS bumps
max_tokensto 2000–3000 for AI flows to accommodate this.
Wayfinder
Pure frontend tweaks that make large graphs more navigable. No nodes. No workflow changes. Just better visual feedback.
Settings
Exposed in ComfyUI Settings → Maxomarai → Wayfinder:
| Setting | Type | Default | Purpose |
|---|---|---|---|
| Type-colored drag link | toggle | on | While dragging a new connection, color the line with the socket's type color instead of ComfyUI's default green |
| Drag highlight | toggle | on | While dragging: dim unconnected nodes, glow source/target in their own color, pulse the primary link |
| Idle color glow | toggle | on | Palette-colored nodes get a subtle breathing glow even when you're not dragging |
| Node glow intensity | slider | 1.0 | Scales glow brightness/size (0.3–2.0) |
| Pulse speed | slider | 1.0 | Breathing pulse multiplier (0.3–3.0) |
| Override glow color | toggle | off | Use a fixed glow color below instead of each node's own palette color |
| Glow color | color | #64b4ff |
Used when override is on |
| Override untyped link color | toggle | off | Use a fixed color for links/drag-lines with untyped sockets (STRING, INT, etc.) |
| Untyped link color | color | #99AA99 |
Used when override is on |
Development
cd ComfyUI/custom_nodes
git clone https://github.com/maxomarai/maxomarai-pack.git
cd maxomarai-pack
# hack on nodes/the_last_model_switcher.py or web/js/*.js
# restart ComfyUI (Python change) or F5 (JS change) to see results
The frontend uses Preact + htm + Lucide icons loaded from esm.sh at runtime — no build step required.
Philosophy
Clean UI by default, power accessible on demand. Widgets you rarely touch (like enhance_style, custom instructions, LoRA stacks) collapse behind chevrons. Widget preferences persist in localStorage. Destructive AI suggestions always preview-then-confirm before touching config files.
License
MIT © 2026 Maxomarai
Changelog
See CHANGELOG.md.

