Skip to main content

Find unused models and broken LoRAs in your ComfyUI install.

Project description

comfy-vault

Find unused models and broken LoRAs in your ComfyUI install.

comfy-vault is a standalone CLI that indexes your models/ tree (including nested subfolders), reads your workflow files to see which models you actually use, and reports the ones nothing references — so you can reclaim disk space without guessing. It does not need to run inside ComfyUI.

comfy-vault orphans demo

Install

pip install comfy-model-vault

The PyPI distribution is comfy-model-vault (the shorter name was already taken); it installs the comfy-vault command and the comfy_vault package.

Python 3.10+. The only runtime dependencies are click, pydantic and pyyaml.

Quickstart

# Index every model under a directory, recursively
comfy-vault scan /path/to/ComfyUI/models

# List models that no workflow references
comfy-vault orphans /path/to/ComfyUI/models \
  --workflows /path/to/ComfyUI/user/default/workflows

orphans is read-only. To actually remove the files, add --delete (it shows what it will do and asks for confirmation first; --yes skips the prompt):

comfy-vault orphans ./models --workflows ./workflows --delete

If your models live in several places, point comfy-vault at your extra_model_paths.yaml and it scans every declared root:

comfy-vault scan --extra-paths /path/to/extra_model_paths.yaml

Find byte-identical duplicates, hash files the way Civitai does, back-fill Civitai metadata by hash, or pre-flight free space before a download:

comfy-vault duplicates ./models                 # same-SHA256 copies
comfy-vault hash ./models --cache .vault.json   # SHA256 + Civitai AutoV2
comfy-vault civitai ./models --fixtures ./recorded   # offline metadata back-fill
comfy-vault space /mnt/nas/models --need 6GB    # will the next download fit?

Why

These are real, currently-open behaviours in ComfyUI and its ecosystem that make manual model cleanup error-prone. comfy-vault works around them from the outside:

  • Models in subfolders are easy to lose track of (ComfyUI #10711). The scanner walks every level, not just the category root.
  • extra_model_paths.yaml parsing is fragile and can throw on non-string values (ComfyUI #11404, PR #6441 closed unmerged). comfy-vault's parser skips reserved keys and bad values instead of crashing.
  • Symlinks and junctions break on update, especially on Windows (ComfyUI #7662, #4412). comfy-vault reads canonical paths and never relies on ComfyUI-managed links.

There is no widely-used standalone orphan detector for ComfyUI today, which is the gap this fills.

Comparison

comfy-vault is not a replacement for the model managers — it does one thing they don't, and skips the things they do well.

comfy-vault ComfyUI-Manager ComfyUI-Lora-Manager
Runs without ComfyUI yes no (extension) no (extension)
Recursive subfolder scan yes partial yes
Orphan detection from workflows yes no no
Duplicate detection (content hash) yes no metadata-based
Civitai metadata back-fill (by hash) yes no yes
Download / install models no yes yes
In-ComfyUI UI no yes yes

If you want to download models or manage them inside the ComfyUI web UI, use the managers above. Use comfy-vault when you want to find and remove what you no longer need, or to audit a large library from a script or a backup host.

How orphan detection decides

A model is an orphan when no scanned workflow references its filename. Reference extraction is intentionally greedy: any string in a workflow JSON that ends in a known model extension counts as "in use", across both the UI and API workflow formats and any custom node. Because --delete removes files, comfy-vault errs toward keeping a model rather than risk flagging one that is actually used. Deletion is also confined to files inside the directories you scanned.

How duplicate detection avoids false positives

comfy-vault duplicates groups files only by their full SHA256, so two files are duplicates iff their bytes are identical. Four distinct LoRAs that share a name or a Civitai model are never grouped, because their content differs — which is exactly the false positive reported in Lora-Manager #841, where weaker matching flagged four different Qwen LoRAs as duplicates.

Web UI

For a read-only browser view, install the web extra and run the server:

pip install "comfy-model-vault[web]"
comfy-vault serve --models-dir /path/to/ComfyUI/models \
  --workflows /path/to/ComfyUI/user/default/workflows

It serves on http://127.0.0.1:8200 (FastAPI + HTMX, no JS framework) with an overview, the orphan and duplicate lists, base-model mismatch warnings, and a Civitai version browser. The base-model warnings flag LoRAs whose Civitai base model is not covered by any installed checkpoint; the version browser lists every Civitai version of a model and marks which are installed (Lora-Manager #778).

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

comfy_model_vault-0.3.0.tar.gz (266.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comfy_model_vault-0.3.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file comfy_model_vault-0.3.0.tar.gz.

File metadata

  • Download URL: comfy_model_vault-0.3.0.tar.gz
  • Upload date:
  • Size: 266.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for comfy_model_vault-0.3.0.tar.gz
Algorithm Hash digest
SHA256 03cafb74ed4d91e1db48d55a3f1c4a21fd8fa4a73b5d561b2f9bfadd8b1a6c37
MD5 4c0381882795349ff6e13261cb9c06e3
BLAKE2b-256 9277cee3ba4268e2c1db0679186a2f62e27e9ebea0fc634dee8f6c0566f5bce3

See more details on using hashes here.

File details

Details for the file comfy_model_vault-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for comfy_model_vault-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df51d985091add37b64137b62d301e01e440a6d16108ecb0c3856cc15bd85789
MD5 3df94ad3f164da0b8e25848f377de4ad
BLAKE2b-256 d61a7f3f97a34d983647c8ee0ce7efa5d42aedd2f81fd2cb10a66e2db5d90b39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page