chflame163 / ComfyUI_LayerStyle

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
MIT License
1.6k stars 96 forks source link

cache_model causes multiple caches #428

Open longgui0318 opened 4 days ago

longgui0318 commented 4 days ago

In my case, I have multiple SegmentAnythingUltraV2 nodes, processing different images, and I wanted to use cache_model to improve speed, but found that the final GPU usage was N* cache_model .

Can we use a global cache to make it easier to use and speed up the process? In addition, it is recommended that after the model is used, it is unloaded to the CPU-memory and does not occupy the GPU. The switching speed between the two is very fast. It is not recommended to use this kind of tool-type resident GPU.

chflame163 commented 4 days ago

There is indeed this issue, as the nodes develp in the early stages did not take these into consideration. To change this situation, a new node needs to be created