feat: override text encoders for unet models (#682)

This commit is contained in:
stduhpf
2025-07-04 16:19:47 +02:00
committed by GitHub
parent 76c72628b1
commit 19fbfd8639
3 changed files with 21 additions and 9 deletions

View File

@@ -1539,6 +1539,15 @@ bool ModelLoader::init_from_ckpt_file(const std::string& file_path, const std::s
return true;
}
bool ModelLoader::model_is_unet() {
for (auto& tensor_storage : tensor_storages) {
if (tensor_storage.name.find("model.diffusion_model.input_blocks.") != std::string::npos) {
return true;
}
}
return false;
}
SDVersion ModelLoader::get_sd_version() {
TensorStorage token_embedding_weight, input_block_weight;
bool input_block_checked = false;