sd: sync to master-447-ccb6b0a (#1898)

* sd: sync to master-438-298b110

* sd: sync to master-440-3e81246

* sd: sync to master-444-a0adcfb

* sd: sync to master-447-ccb6b0a
This commit is contained in:
Wagner Bruna
2025-12-27 05:30:52 -03:00
committed by GitHub
parent 9bb362cce9
commit 84765f5967
19 changed files with 2568 additions and 307 deletions
+9 -2
View File
@@ -1837,7 +1837,12 @@ int64_t ModelLoader::get_params_mem_size(ggml_backend_t backend, ggml_type type)
return mem_size;
}
bool convert(const char* input_path, const char* vae_path, const char* output_path, sd_type_t output_type, const char* tensor_type_rules) {
bool convert(const char* input_path,
const char* vae_path,
const char* output_path,
sd_type_t output_type,
const char* tensor_type_rules,
bool convert_name) {
ModelLoader model_loader;
if (!model_loader.init_from_file(input_path)) {
@@ -1851,7 +1856,9 @@ bool convert(const char* input_path, const char* vae_path, const char* output_pa
return false;
}
}
model_loader.convert_tensors_name();
if (convert_name) {
model_loader.convert_tensors_name();
}
bool success = model_loader.save_to_gguf_file(output_path, (ggml_type)output_type, tensor_type_rules);
return success;
}