fallback flux loader

This commit is contained in:
Concedo 2024-11-07 15:55:43 +08:00
parent c9977a5cb5
commit 262437f393
3 changed files with 25 additions and 1 deletions

View file

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