Files
aigen/docs/studio2-lora-catalog.md

1.2 KiB

Production LoRA names in Studio 2

LoRA keys are user library data, not Git branch files. Separate dev storage does not contain production aliases automatically.

The dev host runs xaigen-dev-lora-catalog.path, watching the production user's catalog directory. Its oneshot service runs server/utils/studio2/export-lora-catalog.py SOURCE_CATALOG DESTINATION on changes. The installed helper is /usr/local/lib/xaigen-dev/export-lora-catalog.py.

The destination is studio2/shared-lora-catalog.cache inside the existing dev library volume. It contains only loraAliases and loraTriggers. No production catalog, media, passwords, or tokens are mounted into dev. The exporter writes atomically and skips unchanged content.

Both Studio 2 library and LoRA endpoints read this file on each request, normalize identity keys, and prefer production values over local duplicates. Unmapped dev entries remain available. If the export is unavailable, local settings remain usable. STUDIO2_LORA_CATALOG_PATH optionally overrides the export path.

The existing library poll refreshes labels and triggers without waking Comfy or restarting a generation. A one-time settings API import seeds local fallback labels and triggers. Main and Studio 1 code are unchanged.