Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conditioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ struct FrozenCLIPEmbedderWithCustomWords : public Conditioner {
bool load_embedding(std::string embd_name, std::string embd_path, std::vector<int32_t>& bpe_tokens) {
// the order matters
ModelLoader model_loader;
if (!model_loader.init_from_file(embd_path)) {
if (!model_loader.init_from_file_and_convert_name(embd_path)) {
LOG_ERROR("embedding '%s' failed", embd_name.c_str());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion control.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ struct ControlNet : public GGMLRunner {
std::set<std::string> ignore_tensors;

ModelLoader model_loader;
if (!model_loader.init_from_file(file_path)) {
if (!model_loader.init_from_file_and_convert_name(file_path)) {
LOG_ERROR("init control net model loader from file failed: '%s'", file_path.c_str());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion esrgan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct ESRGAN : public GGMLRunner {
LOG_INFO("loading esrgan from '%s'", file_path.c_str());

ModelLoader model_loader;
if (!model_loader.init_from_file(file_path)) {
if (!model_loader.init_from_file_and_convert_name(file_path)) {
LOG_ERROR("init esrgan model loader from file failed: '%s'", file_path.c_str());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion flux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ namespace Flux {
ggml_type model_data_type = GGML_TYPE_Q8_0;

ModelLoader model_loader;
if (!model_loader.init_from_file(file_path, "model.diffusion_model.")) {
if (!model_loader.init_from_file_and_convert_name(file_path, "model.diffusion_model.")) {
LOG_ERROR("init model loader from file failed: '%s'", file_path.c_str());
return;
}
Expand Down
6 changes: 4 additions & 2 deletions ggml_extend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,8 +1568,10 @@ struct GGMLRunner {
struct ggml_cgraph* get_compute_graph(get_graph_cb_t get_graph) {
prepare_build_in_tensor_before();
struct ggml_cgraph* gf = get_graph();
auto result = ggml_graph_node(gf, -1);
ggml_set_name(result, final_result_name.c_str());
if (ggml_graph_n_nodes(gf) > 0) {
auto result = ggml_graph_node(gf, -1);
ggml_set_name(result, final_result_name.c_str());
}
prepare_build_in_tensor_after(gf);
return gf;
}
Expand Down
Loading
Loading