File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -1461,7 +1461,10 @@ SDVersion ModelLoader::get_sd_version() {
1461
1461
TensorStorage token_embedding_weight, input_block_weight;
1462
1462
bool input_block_checked = false ;
1463
1463
1464
- bool is_xl = false ;
1464
+ bool has_multiple_encoders = false ;
1465
+ bool is_unet = false ;
1466
+
1467
+ bool is_xl = false ;
1465
1468
bool is_flux = false ;
1466
1469
1467
1470
#define found_family (is_xl || is_flux)
@@ -1476,10 +1479,22 @@ SDVersion ModelLoader::get_sd_version() {
1476
1479
if (tensor_storage.name .find (" model.diffusion_model.joint_blocks." ) != std::string::npos) {
1477
1480
return VERSION_SD3;
1478
1481
}
1482
+ if (tensor_storage.name .find (" model.diffusion_model.input_blocks." ) != std::string::npos) {
1483
+ is_unet = true ;
1484
+ if (has_multiple_encoders){
1485
+ is_xl = true ;
1486
+ if (input_block_checked) {
1487
+ break ;
1488
+ }
1489
+ }
1490
+ }
1479
1491
if (tensor_storage.name .find (" conditioner.embedders.1" ) != std::string::npos || tensor_storage.name .find (" cond_stage_model.1" ) != std::string::npos) {
1480
- is_xl = true ;
1481
- if (input_block_checked) {
1482
- break ;
1492
+ has_multiple_encoders = true ;
1493
+ if (is_unet){
1494
+ is_xl = true ;
1495
+ if (input_block_checked) {
1496
+ break ;
1497
+ }
1483
1498
}
1484
1499
}
1485
1500
if (tensor_storage.name .find (" model.diffusion_model.input_blocks.8.0.time_mixer.mix_factor" ) != std::string::npos) {
You can’t perform that action at this time.
0 commit comments