Skip to content

Conversation

@comfyanonymous
Copy link
Owner

No description provided.

@comfyanonymous comfyanonymous merged commit 8ab15c8 into master May 9, 2025
6 checks passed
bigcat88 added a commit to Visionatrix/Visionatrix that referenced this pull request May 12, 2025
@comfyanonymous comfyanonymous deleted the temp_pr branch May 12, 2025 18:31
@richardm1
Copy link

I'm thoroughly confused. We've been going around and around in an effort to gain the ability to disable memory mapped checkpoint reads -- there's every indication the Stable Diffusion ecosystem (including Comfy) loads via mmap by default and this wreaks havoc on anyone not using local NVMe storage storage due to the choppy, small block, discontiguous I/O. This pull turns on something that's already on?

I've tried this switch and it doesn't help. What does help is this hack.

I'm digging around for some strace or bpftrace that can confirm/refute the notion of mmap reads by default...

@mcmonkey4eva
Copy link
Contributor

@richardm1 it's the safetensors lib that mmaps by default, this PR is specifically for legacy ckpt files (which still get used for some obscure cases, eg upscale models, yolo, etc. often have pickle files).

For dealing with the mmap mess, you'll want to look at the upstream https://github.com/huggingface/safetensors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants