mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-09-25 12:40:41 +00:00
fix: load safetensors index shards without recursion (#2058)
This commit is contained in:
parent
510bccf330
commit
4c3cf7543d
@ -322,7 +322,13 @@ bool ModelLoader::init_from_safetensors_index_file(const std::string& file_path,
|
||||
}
|
||||
|
||||
for (const std::string& shard_path : shard_paths) {
|
||||
if (!parse_file(shard_path, prefix)) {
|
||||
FileStamp stamp;
|
||||
if (!read_file_stamp(shard_path, stamp)) {
|
||||
return false;
|
||||
}
|
||||
parsed_dependencies_.push_back(stamp);
|
||||
LOG_INFO("load %s using safetensors format", shard_path.c_str());
|
||||
if (!init_from_safetensors_file(shard_path, prefix)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user