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.
Install
pip install comfy-model-vault
The PyPI distribution is
comfy-model-vault(the shorter name was already taken); it installs thecomfy-vaultcommand and thecomfy_vaultpackage.
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.yamlparsing 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file comfy_model_vault-0.3.1.tar.gz.
File metadata
- Download URL: comfy_model_vault-0.3.1.tar.gz
- Upload date:
- Size: 268.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b7774062207ff9baa4371edd470dbfb6e593145f512f6b7164ac02960e6a368
|
|
| MD5 |
802cf5d48b972e8dfa2f151bbf2ea077
|
|
| BLAKE2b-256 |
7f662c9a74d0a361cea86afb204e2c9d81581c0ca4a92f5407c27f6fdb498e0c
|
File details
Details for the file comfy_model_vault-0.3.1-py3-none-any.whl.
File metadata
- Download URL: comfy_model_vault-0.3.1-py3-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3319d58fe9b8cb48b79832129ff88016238b4aa95ad6d7aa15129caf7046a8a
|
|
| MD5 |
8f6affda75d82f3a381e367e5c7f1138
|
|
| BLAKE2b-256 |
d4d954ee336146a72187ec96b4eae01fd8eb0233b78d9871605c5e41ddcb0074
|