mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-09-28 17:08:05 -05:00
fix: map mmapped weights through Metal buffers instead of CPU buffers (#2037)
This commit is contained in:
@@ -161,6 +161,9 @@ resident allocations. Vulkan reports exceeding total memory are rejected because
|
||||
its heap-budget subtraction can underflow. Other backends use the cap instead of
|
||||
treating such reports as zero free memory. Failed checks log the reported free and
|
||||
total memory alongside tracked weight and runtime allocations.
|
||||
With `--mmap`, device-backed mappings count toward these budgets at their full
|
||||
mapped-file size, once per device buffer even when multiple parameter blocks
|
||||
share it. Mappings retained in the loader cache continue to count.
|
||||
|
||||
Components are considered in `diffusion`, `te`, `vae` order so that repeatedly
|
||||
used diffusion weights have priority. Each component's weights use the first
|
||||
|
||||
Reference in New Issue
Block a user