taesd disable if not valid model arch

This commit is contained in:
Concedo 2025-09-27 17:00:30 +08:00
parent 42087c3622
commit cbb8a3feb5

View file

@ -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<int>(SD_TYPE_COUNT, GGML_TYPE_COUNT)