Skip to content

Run every media model in its own runtime - #39

Merged
data-angel merged 7 commits into
mainfrom
feat/per-model-media
Sep 27, 2026
Merged

data-angel merged 7 commits into
mainfrom
feat/per-model-media

Conversation

@data-angel

Copy link
Copy Markdown
Contributor

Summary

Public main installs all 14 ComfyUI media recipes into one shared lloom-comfyui-media container. That hides the individual models from LLooM's admission, eviction and memory accounting. This PR gives every media model its own runtime.

  • Per-model recipes (from codex/isolated-media-runtimes-20260924). Each of the 14 ComfyUI recipes gets its own runtime, container, data volume and port. Only that model's checkpoint, encoder, VAE and adapter files are bind-mounted, read-only. The bridge serves exactly the LLOOM_MEDIA_MODEL it was started with, and refuses an empty or unknown selection. Memory estimates are now per model; FLUX.2 klein, for example, drops from 95 GB to 20 GB.
  • The shared runtime is removed.
    • build/launch.py refuses to start without LLOOM_MEDIA_MODEL and no longer defaults to the aggregate /opt/lloom-models root.
    • Re-applying a recipe on a host that still routes a model through a legacy shared comfyui-media runtime moves that model to its own runtime. The shared runtime and backend are dropped once no model references them. Before this, setup silently kept the shared route.
    • Recipes pin the rebuilt image (source-381d99b…).
  • OpenRouter Lyria audio generation adapter (from codex/lyria-music-adapter, which was stacked on the isolation commit).

Test plan

  • npm run test:unit (full chain, pass)
  • node test/comfyui-media.test.mjs, including a new legacy shared → per-model migration case
  • scripts/test-comfyui-media.py (209 pass, including the new launcher refusal test)
  • node --test test/audio-providers.test.mjs
  • node scripts/check-package.mjs
  • Hosts: rebuild the image with lloom setup --recipe <id> --additive --apply, then remove the orphaned shared container

🤖 Generated with Claude Code

data-angel and others added 7 commits September 24, 2026 07:12
Each media container now serves exactly one model: the launcher refuses
to start without LLOOM_MEDIA_MODEL and no longer defaults to the
aggregate /opt/lloom-models root. Re-applying a recipe moves a model off
a legacy shared comfyui-media runtime to its own, and drops the shared
runtime and backend once no model references them. Recipes pin the
rebuilt image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@data-angel
data-angel merged commit 154a438 into main Sep 27, 2026
2 checks passed
@data-angel
data-angel deleted the feat/per-model-media branch September 27, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant