From cbb8a3feb5232643b78fe8927d00f27494e4fa8c Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 27 Sep 2025 17:00:30 +0800 Subject: [PATCH] taesd disable if not valid model arch --- otherarch/sdcpp/stable-diffusion.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/otherarch/sdcpp/stable-diffusion.cpp b/otherarch/sdcpp/stable-diffusion.cpp index 8cdde9e96..dc01c498b 100644 --- a/otherarch/sdcpp/stable-diffusion.cpp +++ b/otherarch/sdcpp/stable-diffusion.cpp @@ -293,7 +293,11 @@ public: { std::string to_search = "taesd.embd"; std::string to_replace = ""; - if(sd_version_is_sdxl(version)) + if(sd_version_is_sd1(version) || sd_version_is_sd2(version)) + { + to_replace = "taesd.embd"; + } + else if(sd_version_is_sdxl(version)) { to_replace = "taesd_xl.embd"; } @@ -313,6 +317,12 @@ public: taesd_path_fixed.replace(pos, to_search.length(), to_replace); } } + else + { + printf("\nCannot use TAESD: Unknown version %d. TAESD Disabled!\n",version); + taesd_path_fixed = ""; + use_tiny_autoencoder = false; + } } ggml_type wtype = (int)sd_ctx_params->wtype < std::min(SD_TYPE_COUNT, GGML_TYPE_COUNT)