Comfy-Org / Comfy-Org/ComfyUI

Can the model be loaded in memory for a long time

Open
#7,437 6 comments 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

![Image](https://github.com/user-attachments/assets/197b03a5-69b5-4cfe-882c-31f3d26982a8)

我有192G的内存,每次换工作流,例如flux换flux-canny的时候,就会释放掉flux,加载另外的模型,如果换回flux又会等待模型重新加载。
能不能增加一个设置选项,设置最大使用的内存总量,例如达到100G后,才释放一定量的内存。
在普通显卡上感知不明显,但是在5090或4090上,有时候一张图计算时间才十几秒,而首次等待加载和计算就需要四十多秒。

### Existing Solutions

_No response_

### 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.