@@ -32,6 +32,7 @@ struct SDCliParams {
3232
3333 bool verbose = false ;
3434 bool canny_preprocess = false ;
35+ bool convert_name = false ;
3536
3637 preview_t preview_method = PREVIEW_NONE;
3738 int preview_interval = 1 ;
@@ -69,6 +70,10 @@ struct SDCliParams {
6970 " --canny" ,
7071 " apply canny preprocessor (edge detection)" ,
7172 true , &canny_preprocess},
73+ {" " ,
74+ " --convert-name" ,
75+ " convert tensor name (for convert mode)" ,
76+ true , &canny_preprocess},
7277 {" -v" ,
7378 " --verbose" ,
7479 " print extra info" ,
@@ -174,6 +179,7 @@ struct SDCliParams {
174179 << " verbose: " << (verbose ? " true" : " false" ) << " ,\n "
175180 << " color: " << (color ? " true" : " false" ) << " ,\n "
176181 << " canny_preprocess: " << (canny_preprocess ? " true" : " false" ) << " ,\n "
182+ << " convert_name: " << (convert_name ? " true" : " false" ) << " ,\n "
177183 << " preview_method: " << previews_str[preview_method] << " ,\n "
178184 << " preview_interval: " << preview_interval << " ,\n "
179185 << " preview_path: \" " << preview_path << " \" ,\n "
@@ -387,7 +393,8 @@ int main(int argc, const char* argv[]) {
387393 ctx_params.vae_path .c_str (),
388394 cli_params.output_path .c_str (),
389395 ctx_params.wtype ,
390- ctx_params.tensor_type_rules .c_str ());
396+ ctx_params.tensor_type_rules .c_str (),
397+ cli_params.convert_name );
391398 if (!success) {
392399 LOG_ERROR (" convert '%s'/'%s' to '%s' failed" ,
393400 ctx_params.model_path .c_str (),
0 commit comments