Comfy-Org / Comfy-Org/ComfyUI

Model usage statistics for cleanup suggestions

Open
#14,565 1 comment 0 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Feature Idea

**Model Usage Statistics & Cleanup Assistant**

I suggest adding a built-in model usage tracking system to ComfyUI. Currently, after downloading a model to test a workflow, there's no way to know if it's still being used. Over time, the models folder accumulates hundreds of GB of unused models.

**Proposed Solution:**

1. Add a lightweight SQLite database (`model_stats.db`) in the ComfyUI root directory.
2. Track each model file when it's loaded: record model_path, model_type, file_size, first_used timestamp, last_used timestamp, and use_count.
3. Insert a one-line hook in every loader function (CheckpointLoaderSimple, LoraLoader, VAELoader, UNETLoader, CLIPLoader, ControlNetLoader, etc.) to record usage when a model is loaded.
4. Provide a simple UI panel (e.g., a custom node or a tab in the main UI) that displays:
- Model file name
- Type (checkpoint/lora/vae/controlnet/etc.)
- File size
- Last used date
- Usage count
- A "safe to delete" suggestion
5. Allow sorting by last_used or usage_count, so users can easily identify models that haven't been used for months and can be safely deleted.

This is a framework-level feature, not a custom node, because it requires hooks in all built-in loader nodes. It would greatly improve the user experience for anyone who frequently tests workflows.

### Existing Solutions

I searched for existing custom nodes that track model usage, but found none. The only workaround is manually maintaining a readme.md file, which is error-prone and unsustainable. Some users use file system last-modified timestamps as a rough proxy, but this only tracks download time, not actual usage.

### Other

Currently my models folder is ~600GB and I cannot tell which models are safe to delete. This feature would solve a real pain point for many users.

Contributor guide

Open the contributing guide

Research direction

Start by mapping the named loader entry points—CheckpointLoaderSimple, LoraLoader, VAELoader, UNETLoader, CLIPLoader, and ControlNetLoader—and the main UI or custom-node entry point. Define how model_stats.db records each load and how the panel presents sorting and deletion suggestions; done means built-in loaders report usage and the UI displays the requested statistics.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
backend-api-design, frontend, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.