mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-07-31 07:10:41 -05:00
fix: avoid writable mmap for read-only weights (#1698)
This commit is contained in:
@@ -480,7 +480,7 @@ bool ModelManager::mmap_params(const std::vector<TensorState*>& states,
|
||||
return true;
|
||||
}
|
||||
|
||||
auto mmap_store = model_loader_.mmap_tensors(mmap_candidates, {}, true);
|
||||
auto mmap_store = model_loader_.mmap_tensors(mmap_candidates, {}, writable_mmap_);
|
||||
if (mmap_store.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user