Enhance: pick downloaded LoRAs per job (LoRA slots + catalog) #220

Open
opened 2026-11-03 19:20:44 +00:00 by cameron · 0 comments
Owner

Follow-up to #218. Let the user pick any compatible downloaded LoRA for a template, instead of only the switches declared in enhance.toml.

Proposal

Slots in the workflow

  • The template gets N generic LoRA pairs (e.g. 2–3), titled imageapi:lora-slot:<n>. For Wan 2.2 the high-noise and low-noise nodes share a slot number.
  • The graph stays fixed and nothing is inserted on the fly: an unused slot runs at strength 0.

Catalog

  • ImageApi lists the LoRAs ComfyUI can see from /object_info/LoraLoaderModelOnly (lora_name choices), cached alongside the availability probe.
  • Only LoRAs that match the template's base model are offered. Suggested: a per-template folder, e.g. loras/wan22-i2v/, set in enhance.toml as lora_folder.
  • Pairing: Wan 2.2 needs a high and a low file. Pair by a case-insensitive high/low name match (…High… / …Low…, -HIGH / -LOW), with [[template.lora_pair]] { label, high, low } overrides for names that don't match. A file with no partner isn't offered.
  • Labels: derived from the file name, or set in the override.

API

  • GET /enhance/templates: each template gains catalog: [{id, label}] and slots: n. The id is stable, e.g. derived from the file names.
  • POST /enhance: slots: [{lora: <catalog id>, scale}], up to n. Each slot's two nodes get the pair's file names, and the scale multiplies the slot's exported strength, the same rule as #218's switches. Unknown ids and too many slots are 400s.
  • The job stores the resolved picks for Retry and Adjust.

App

  • An "Add LoRA" picker in the Enhance sheet, up to n entries, each with the existing switch and strength slider.

Fits with #218: the declared switches keep working, and slots sits next to loras.

Open questions

  • Whether discovery should be live from ComfyUI, or a list kept in enhance.toml. Live means a new download shows up without a config edit.
  • How many slots. Each LoRA pair adds about 10 s per clip on the 4090.

🤖 Generated with Claude Code

Follow-up to #218. Let the user pick any compatible downloaded LoRA for a template, instead of only the switches declared in enhance.toml. ## Proposal **Slots in the workflow** - The template gets N generic LoRA pairs (e.g. 2–3), titled `imageapi:lora-slot:<n>`. For Wan 2.2 the high-noise and low-noise nodes share a slot number. - The graph stays fixed and nothing is inserted on the fly: an unused slot runs at strength 0. **Catalog** - ImageApi lists the LoRAs ComfyUI can see from `/object_info/LoraLoaderModelOnly` (`lora_name` choices), cached alongside the availability probe. - Only LoRAs that match the template's base model are offered. Suggested: a per-template folder, e.g. `loras/wan22-i2v/`, set in enhance.toml as `lora_folder`. - **Pairing:** Wan 2.2 needs a high and a low file. Pair by a case-insensitive `high`/`low` name match (`…High…` / `…Low…`, `-HIGH` / `-LOW`), with `[[template.lora_pair]] { label, high, low }` overrides for names that don't match. A file with no partner isn't offered. - **Labels:** derived from the file name, or set in the override. **API** - `GET /enhance/templates`: each template gains `catalog: [{id, label}]` and `slots: n`. The id is stable, e.g. derived from the file names. - `POST /enhance`: `slots: [{lora: <catalog id>, scale}]`, up to n. Each slot's two nodes get the pair's file names, and the scale multiplies the slot's exported strength, the same rule as #218's switches. Unknown ids and too many slots are 400s. - The job stores the resolved picks for Retry and Adjust. **App** - An "Add LoRA" picker in the Enhance sheet, up to n entries, each with the existing switch and strength slider. **Fits with #218:** the declared switches keep working, and `slots` sits next to `loras`. ## Open questions - Whether discovery should be live from ComfyUI, or a list kept in enhance.toml. Live means a new download shows up without a config edit. - How many slots. Each LoRA pair adds about 10 s per clip on the 4090. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.