You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to load it with ws = safe_open("./flux1-dev.safetensors", framework="pt")
Receive "RuntimeError: unable to mmap 23802932552 bytes from file <./flux1-dev.safetensors>: Cannot allocate memory (12)"
Expected behavior
The tensors should be lazy loaded.
I should be able to access metadata and choose to actually load a tensor into RAM/VRAM when needed.
The fact that the .safetensors file is 24 GB and I have 16 GB of RAM shouldn't affect the loading.
(I can safely lazy load a safetensors file that is around 5 GB with the exact same script, and no memory is actually allocated and everything works as expected. The issue only arises when attempting to load a safetensors file that is larger than system RAM.)
The text was updated successfully, but these errors were encountered:
System Info
transformers
version: 4.44.2Information
Reproduction
Expected behavior
The tensors should be lazy loaded.
I should be able to access metadata and choose to actually load a tensor into RAM/VRAM when needed.
The fact that the .safetensors file is 24 GB and I have 16 GB of RAM shouldn't affect the loading.
(I can safely lazy load a safetensors file that is around 5 GB with the exact same script, and no memory is actually allocated and everything works as expected. The issue only arises when attempting to load a safetensors file that is larger than system RAM.)
The text was updated successfully, but these errors were encountered: