Phase 1: flip the imagegen-* aliases onto comfyui-image, delete the sd-server entries #5

Open
opened 2026-08-06 00:51:42 +00:00 by steve · 0 comments
Owner

Part of #3. Blocked by #4.

Once the A/B says ComfyUI is at least as good, make it the real engine — without touching mort at all.

The change

includeAliasesInList: true          # top level

"comfyui-image":
  unlisted: false
  aliases:
    - "imagegen-flux-dev"
    - "imagegen-flux-schnell"
    - "imagegen-flux-kontext"
    - "imagegen-qwen-image"
    - "imagegen-qwen-image-edit"
  # ... rest unchanged from phase 0

Then delete the five imagegen-* model entries and replace their five lines in the all group with the single comfyui-image.

Why this needs no mort change

  • llama-swap resolves an alias to the owning model (internal/config/config.go:190), so all five ids land on the one warm process
  • majordomo already puts model: imagegen-flux-dev in the /sdapi body; the shim reads that same field to pick the graph. The id it sends is unchanged
  • /v1/models emits a record per alias when includeAliasesInList is on (internal/server/api.go:173), and mort's classifyModel buckets by id prefix — so llamaswap_status and image_model_guide keep listing five image models
  • mort's imageModelProfiles, ImageEditModels(), and the skills.llamaswap.image.* convars all key on the same ids and are untouched

Known cosmetic drift — accept or fix deliberately

  1. Aliases inherit the parent's name / description / capabilities in /v1/models (api.go:174 passes mc.Name, mc.Description, mc.Capabilities). All five will read "ComfyUI image". mort does not use those strings — imageModelProfiles carries its own agent-facing notes — so this is cosmetic in the web Playground only. Fixing it properly means per-alias metadata in the fork; file separately if it grates.
  2. /running reports comfyui-image, not whichever alias was asked for. Shows up in llamaswap_status's running list.

Payoff

Switching flux-dev → qwen-image stops being docker stop + docker run + engine boot and becomes an intra-process ComfyUI model swap against a warm CUDA context. Baseline to beat: cold-with-swap 45s–3m.

Watch

RAM. 46 GB total. ComfyUI caching several 12–15 GB checkpoints in RAM will thrash. Settle --cache-none vs an LRU cap during phase 0 and carry the answer here.

Rollback

Re-add the five deleted entries (three lines each, in git history) and drop the aliases block. mort never knew.

Part of #3. Blocked by #4. Once the A/B says ComfyUI is at least as good, make it the real engine — **without touching mort at all**. ## The change ```yaml includeAliasesInList: true # top level "comfyui-image": unlisted: false aliases: - "imagegen-flux-dev" - "imagegen-flux-schnell" - "imagegen-flux-kontext" - "imagegen-qwen-image" - "imagegen-qwen-image-edit" # ... rest unchanged from phase 0 ``` Then delete the five `imagegen-*` model entries and replace their five lines in the `all` group with the single `comfyui-image`. ## Why this needs no mort change - llama-swap resolves an alias to the owning model (`internal/config/config.go:190`), so all five ids land on the one warm process - majordomo already puts `model: imagegen-flux-dev` in the `/sdapi` body; the shim reads that same field to pick the graph. The id it sends is unchanged - `/v1/models` emits a record per alias when `includeAliasesInList` is on (`internal/server/api.go:173`), and mort's `classifyModel` buckets by id prefix — so `llamaswap_status` and `image_model_guide` keep listing five image models - mort's `imageModelProfiles`, `ImageEditModels()`, and the `skills.llamaswap.image.*` convars all key on the same ids and are untouched ## Known cosmetic drift — accept or fix deliberately 1. Aliases inherit the **parent's** `name` / `description` / `capabilities` in `/v1/models` (`api.go:174` passes `mc.Name`, `mc.Description`, `mc.Capabilities`). All five will read "ComfyUI image". mort does not use those strings — `imageModelProfiles` carries its own agent-facing notes — so this is cosmetic in the web Playground only. Fixing it properly means per-alias metadata in the fork; file separately if it grates. 2. `/running` reports `comfyui-image`, not whichever alias was asked for. Shows up in `llamaswap_status`'s running list. ## Payoff Switching flux-dev → qwen-image stops being `docker stop` + `docker run` + engine boot and becomes an intra-process ComfyUI model swap against a warm CUDA context. Baseline to beat: cold-with-swap 45s–3m. ## Watch RAM. 46 GB total. ComfyUI caching several 12–15 GB checkpoints in RAM will thrash. Settle `--cache-none` vs an LRU cap during phase 0 and carry the answer here. ## Rollback Re-add the five deleted entries (three lines each, in git history) and drop the `aliases` block. mort never knew.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: steve/llama-swap#5