refector: optimize the usage of tensor_types

This commit is contained in:
leejet
2025-07-28 23:18:29 +08:00
parent 7eb30d00e5
commit f6b9aa1a43
16 changed files with 119 additions and 111 deletions

View File

@@ -648,7 +648,7 @@ std::string convert_tensor_name(std::string name) {
return new_name;
}
void add_preprocess_tensor_storage_types(std::map<std::string, enum ggml_type>& tensor_storages_types, std::string name, enum ggml_type type) {
void add_preprocess_tensor_storage_types(String2GGMLType& tensor_storages_types, std::string name, enum ggml_type type) {
std::string new_name = convert_tensor_name(name);
if (new_name.find("cond_stage_model") != std::string::npos && ends_with(new_name, "attn.in_proj_weight")) {