feat: add Anima support (#1296)

This commit is contained in:
rmatif
2026-03-01 08:23:18 +01:00
committed by GitHub
parent 0752cc9d3a
commit 4cdfff5ff2
8 changed files with 1042 additions and 17 deletions

View File

@@ -1094,6 +1094,14 @@ std::string convert_tensor_name(std::string name, SDVersion version) {
}
}
if (is_lora && sd_version_is_anima(version)) {
static const std::string anima_diffusion_prefix = "model.diffusion_model.";
static const std::string anima_net_prefix = "model.diffusion_model.net.";
if (starts_with(name, anima_diffusion_prefix) && !starts_with(name, anima_net_prefix)) {
name = anima_net_prefix + name.substr(anima_diffusion_prefix.size());
}
}
// cond_stage_model
{
for (const auto& prefix : cond_stage_model_prefix_vec) {