ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

[feat] get correct mem in docker

Open aireet opened this issue 1 year ago • 2 comments

I believe that when comftUI runs in a Docker container, we should obtain accurate memory information. For example, if the Docker container is limited to 32GB of memory, but the host machine has 128GB, psutil still retrieves the memory as 128GB. This may lead to incorrect judgments when other calls to the get_free_memory and get_total_memory functions are made.

aireet avatar Feb 09 '24 19:02 aireet

This feels like it should be a PR to psutil rather than comfy?

mcmonkey4eva avatar Sep 24 '24 08:09 mcmonkey4eva

I have released an extension that can solve this problem non-invasively after installation

search Psutil Container Memory Patch in ComfyUI-Manager

https://github.com/springjk/ComfyUI-Psutil-Container-Memory-Patch

It would be nice if comfyui could fix this, but some other custom nodes use the same approach, so maybe this is a psutil issue, but it seems there's no perfect solution for it.

springjk avatar Apr 23 '25 15:04 springjk