Files
InvokeAI/invokeai/backend
gogurtenjoyer 382d85ee23 Fix memory issues when installing models on Windows (#8652)
* Wrap GGUF loader for context managed close()

Wrap gguf.GGUFReader and then use a context manager to load memory-mapped GGUF files, so that they will automatically close properly when no longer needed. Should prevent the 'file in use in another process' errors on Windows.

* Additional check for cached state_dict

Additional check for cached state_dict as path is now optional - should solve model manager 'missing' this and the resultant memory errors.

* Appease ruff

* Further ruff appeasement

* ruff

* loaders.py fix for linux

No longer attempting to delete internal object.

* loaders.py - one more _mmap ref removed

---------

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2025-11-16 09:25:52 -05:00
..
2025-10-15 10:18:53 +11:00
2025-09-18 11:05:32 +10:00
2024-06-26 21:46:59 +10:00
2025-05-27 07:28:47 +10:00
2025-05-19 13:50:04 +10:00
2025-10-15 10:18:53 +11:00