mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-07-31 15:20:41 -05:00
auto detect z-image-omni
This commit is contained in:
14
model.cpp
14
model.cpp
@@ -1039,6 +1039,8 @@ SDVersion ModelLoader::get_sd_version() {
|
||||
bool is_xl = false;
|
||||
bool is_flux = false;
|
||||
bool is_flux2 = false;
|
||||
bool is_z_image = false;
|
||||
bool is_z_image_omni = false;
|
||||
bool has_single_block_47 = false;
|
||||
bool is_wan = false;
|
||||
int64_t patch_embedding_channels = 0;
|
||||
@@ -1071,7 +1073,10 @@ SDVersion ModelLoader::get_sd_version() {
|
||||
return VERSION_OVIS_IMAGE;
|
||||
}
|
||||
if (tensor_storage.name.find("model.diffusion_model.cap_embedder.0.weight") != std::string::npos) {
|
||||
return VERSION_Z_IMAGE;
|
||||
is_z_image = true;
|
||||
}
|
||||
if (tensor_storage.name.find("model.diffusion_model.siglip_embedder.0.weight") != std::string::npos) {
|
||||
is_z_image_omni = true;
|
||||
}
|
||||
if (tensor_storage.name.find("model.diffusion_model.blocks.0.cross_attn.norm_k.weight") != std::string::npos) {
|
||||
is_wan = true;
|
||||
@@ -1174,6 +1179,13 @@ SDVersion ModelLoader::get_sd_version() {
|
||||
return VERSION_FLUX2_KLEIN;
|
||||
}
|
||||
|
||||
if (is_z_image) {
|
||||
if (is_z_image_omni) {
|
||||
return VERSION_Z_IMAGE_OMNI;
|
||||
}
|
||||
return VERSION_Z_IMAGE;
|
||||
}
|
||||
|
||||
if (token_embedding_weight.ne[0] == 768) {
|
||||
if (is_inpaint) {
|
||||
return VERSION_SD1_INPAINT;
|
||||
|
||||
Reference in New Issue
Block a user