Comfy-Org / Comfy-Org/ComfyUI

Cache to Disk

Open
#11,132 4 comments 1 reaction 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Feature Idea

Add a CLI parameter to provide a directory and maxsize which additionally caches node results to disk (almost like a `swap` partition).
I recently found out that `--cache-ram` keeps node caches even if you switch between previous workflows. It would be nice if caches could also persist across sessions, i.e. when you restart ComfyUI.

### Existing Solutions

```
--cache-classic Use the old style (aggressive) caching.
--cache-lru CACHE_LRU
Use LRU caching with a maximum of N node results
cached. May use more RAM/VRAM.
--cache-none Reduced RAM/VRAM usage at the expense of executing
every node for each run.
--cache-ram [CACHE_RAM]
Use RAM pressure caching with the specified headroom
threshold. If available RAM drops below the threhold
the cache remove large items to free RAM. Default 4GB
```

### Other

_No response_

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.