Comfy-Org / Comfy-Org/ComfyUI

Automatic image cleanup on MAXIMUM_HISTORY_SIZE reached.

Open
#5,603 0 comments 4 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

I have comfy running on a NAS and shared with family members.
Issue is that generation stack up and slowly fill my machine disk
It would be nice to be able to automatically delete old images to prevent filling the disk (and temp folder).

I was thinking of adding an option to comfy-cli to automatically delete iamges removed from the history if the option is on.

ex:
`python main.py --auto-clean-history-files`

and in the execution.py file if this option is activated, it would remove from disk images pop-ed from the history when MAXIMUM_HISTORY_SIZE is reached.

### Existing Solutions

I know images from the temp folder are cleaned on start but for comfy UI remaining on most of the time. Restarting comfy UI is an option not very convenient.

### Other

I will be happy to provide a merge request if you think the feature is interesting and useful to other people.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.