lora-manager-runtime-context

Inspect ComfyUI LoRA Manager settings, metadata sidecars, and SQLite caches for debugging.

1.4k|141|Updated Jan 27, 2025
One-click install
npx skills add https://github.com/willmiao/ComfyUI-Lora-Manager --skill lora-manager-runtime-context
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lora-manager-runtime-context
Source: https://github.com/willmiao/ComfyUI-Lora-Manager/tree/main/.agents/skills/lora-manager-runtime-context
Command: npx skills add https://github.com/willmiao/ComfyUI-Lora-Manager --skill lora-manager-runtime-context

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Debugging ComfyUI LoRA Manager issues often requires locating scattered runtime state such as settings.json, per-library SQLite caches, model metadata sidecars, recipe JSON files, and download history. This Skill resolves the correct settings directory, redacts secrets, and reads caches safely so you can diagnose configuration and cache problems without mutating user data.

Core Features & Use Cases

  • Settings Resolution: Applies the full precedence chain (explicit override via LORA_MANAGER_SETTINGS_DIR or --settings-path, portable mode, then the default user config directory) to find the active settings.json.
  • Read-Only Cache Inspection: Opens model, recipe, FTS, and download-history SQLite databases read-only, reporting table schemas, row counts, and redacted sample rows, with a copy-based fallback for locked databases.
  • Path and Metadata Discovery: Resolves model roots, recipes root, example image folders, symlink maps, and aria2 state, and summarizes .metadata.json sidecars for any model file.
  • Use Case: A user reports missing recipes after switching libraries. Run the caches and recipes subcommands to confirm the active library, verify the recipe cache database contents, and count *.recipe.json files under the resolved recipes root.

Quick Start

Ask the assistant to run the inspect_runtime_context.py summary subcommand to print redacted settings and resolved runtime paths for the LoRA Manager installation.

Frequently Asked Questions about lora-manager-runtime-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the LoRA Manager settings.json file?

The settings directory resolves in precedence order: the LORA_MANAGER_SETTINGS_DIR environment variable or --settings-path flag first, then portable mode via a repo-root settings.json with use_portable_settings enabled, then the default user config directory at ~/.config/ComfyUI-LoRA-Manager. The inspect script's summary subcommand prints the resolved path.

How do I inspect LoRA Manager SQLite caches without corrupting them?

Open the databases read-only using SQLite URI modes mode=ro and immutable=1, which the bundled script does automatically. If a database is locked, the script copies it to a temporary directory and inspects the copy instead, so the live cache is never modified.

Where are LoRA Manager model metadata files stored?

Model metadata lives next to each model file as a sidecar named <model basename>.metadata.json. The model subcommand of the inspect script accepts a model file path and summarizes the corresponding metadata JSON with sensitive values redacted.

Does the inspection script expose my Civitai API key?

No. The script redacts any settings key matching key, token, secret, password, auth, or credential patterns, including civitai_api_key, before printing. Redaction applies recursively to settings, JSON summaries, and sampled SQLite rows.

Why does LoRA Manager show the wrong recipes or caches after switching libraries?

Caches are per-library: model, recipe, and model-update SQLite files are named after the sanitized active library under the cache directory. Check the active_library value in settings.json and confirm you are reading the matching <library>.sqlite files.

Can I inspect a sandboxed or E2E LoRA Manager instance?

Yes. Pass --settings-path DIR (or set LORA_MANAGER_SETTINGS_DIR) to any subcommand to pin the entire settings directory, bypassing portable mode and the default config location. This is the standard approach for sandboxed or end-to-end test instances.