@@ -467,9 +467,6 @@ std::string convert_diffusers_name_to_compvis(std::string key, char seq) {
467467 }
468468
469469 if (match (m, std::regex (format (" unet%cup_blocks%c(\\ d+)%cupsamplers%c0%cconv" , seq, seq, seq, seq, seq)), key)) {
470- if (std::stoi (m[0 ]) == 0 ) {
471- LOG_INFO (key.c_str ());
472- }
473470 return format (" model%cdiffusion_model%coutput_blocks%c" , seq, seq, seq) + std::to_string (2 + std::stoi (m[0 ]) * 3 ) + seq +
474471 (std::stoi (m[0 ]) > 0 ? " 2" : " 1" ) + seq + " conv" ;
475472 }
@@ -1178,7 +1175,7 @@ bool ModelLoader::init_from_safetensors_file(const std::string& file_path, const
11781175 }
11791176
11801177 std::string new_name = prefix + name;
1181- new_name = convert_tensor_name (new_name);
1178+ new_name = prefix == " unet. " ? convert_tensor_name (new_name) : new_name ;
11821179
11831180 TensorStorage tensor_storage (new_name, type, ne, n_dims, file_index, ST_HEADER_SIZE_LEN + header_size_ + begin);
11841181 tensor_storage.reverse_ne ();
@@ -1652,7 +1649,7 @@ SDVersion ModelLoader::get_sd_version() {
16521649 }
16531650 }
16541651 }
1655- if (tensor_storage.name .find (" conditioner.embedders.1" ) != std::string::npos || tensor_storage.name .find (" cond_stage_model.1" ) != std::string::npos) {
1652+ if (tensor_storage.name .find (" conditioner.embedders.1" ) != std::string::npos || tensor_storage.name .find (" cond_stage_model.1" ) != std::string::npos || tensor_storage. name . find ( " te.1 " ) != std::string::npos ) {
16561653 has_multiple_encoders = true ;
16571654 if (is_unet) {
16581655 is_xl = true ;
@@ -1710,7 +1707,7 @@ SDVersion ModelLoader::get_sd_version() {
17101707 if (input_block_weight.ne [0 ] == 128 ) {
17111708 return VERSION_FLUX_CONTROLS;
17121709 }
1713- if (input_block_weight.ne [0 ] == 196 ){
1710+ if (input_block_weight.ne [0 ] == 196 ) {
17141711 return VERSION_FLEX_2;
17151712 }
17161713 return VERSION_FLUX;
0 commit comments