@@ -1047,7 +1047,6 @@ struct SDGenerationParams {
10471047
10481048 std::string cache_mode;
10491049 std::string cache_option;
1050- std::string cache_preset;
10511050 std::string scm_mask;
10521051 bool scm_policy_dynamic = true ;
10531052 sd_cache_params_t cache_params{};
@@ -1461,21 +1460,6 @@ struct SDGenerationParams {
14611460 return 1 ;
14621461 };
14631462
1464- auto on_cache_preset_arg = [&](int argc, const char ** argv, int index) {
1465- if (++index >= argc) {
1466- return -1 ;
1467- }
1468- cache_preset = argv_to_utf8 (index, argv);
1469- if (cache_preset != " slow" && cache_preset != " s" && cache_preset != " S" &&
1470- cache_preset != " medium" && cache_preset != " m" && cache_preset != " M" &&
1471- cache_preset != " fast" && cache_preset != " f" && cache_preset != " F" &&
1472- cache_preset != " ultra" && cache_preset != " u" && cache_preset != " U" ) {
1473- fprintf (stderr, " error: invalid cache preset '%s', must be 'slow'/'s', 'medium'/'m', 'fast'/'f', or 'ultra'/'u'\n " , cache_preset.c_str ());
1474- return -1 ;
1475- }
1476- return 1 ;
1477- };
1478-
14791463 options.manual_options = {
14801464 {" -s" ,
14811465 " --seed" ,
@@ -1519,10 +1503,6 @@ struct SDGenerationParams {
15191503 " --cache-option" ,
15201504 " named cache params (key=value format, comma-separated). easycache/ucache: threshold=,start=,end=,decay=,relative=,reset=; dbcache/taylorseer/cache-dit: Fn=,Bn=,threshold=,warmup=; spectrum: w=,m=,lam=,window=,flex=,warmup=,stop=. Examples: \" threshold=0.25\" or \" threshold=1.5,reset=0\" " ,
15211505 on_cache_option_arg},
1522- {" " ,
1523- " --cache-preset" ,
1524- " cache-dit preset: 'slow'/'s', 'medium'/'m', 'fast'/'f', 'ultra'/'u'" ,
1525- on_cache_preset_arg},
15261506 {" " ,
15271507 " --scm-mask" ,
15281508 " SCM steps mask for cache-dit: comma-separated 0/1 (e.g., \" 1,1,1,0,0,1,0,0,1,0\" ) - 1=compute, 0=can cache" ,
@@ -1575,7 +1555,6 @@ struct SDGenerationParams {
15751555 load_if_exists (" negative_prompt" , negative_prompt);
15761556 load_if_exists (" cache_mode" , cache_mode);
15771557 load_if_exists (" cache_option" , cache_option);
1578- load_if_exists (" cache_preset" , cache_preset);
15791558 load_if_exists (" scm_mask" , scm_mask);
15801559
15811560 load_if_exists (" clip_skip" , clip_skip);
@@ -1810,48 +1789,17 @@ struct SDGenerationParams {
18101789
18111790 if (!cache_mode.empty ()) {
18121791 if (cache_mode == " easycache" ) {
1813- cache_params.mode = SD_CACHE_EASYCACHE;
1814- cache_params.reuse_threshold = 0 .2f ;
1815- cache_params.start_percent = 0 .15f ;
1816- cache_params.end_percent = 0 .95f ;
1817- cache_params.error_decay_rate = 1 .0f ;
1818- cache_params.use_relative_threshold = true ;
1819- cache_params.reset_error_on_compute = true ;
1792+ cache_params.mode = SD_CACHE_EASYCACHE;
18201793 } else if (cache_mode == " ucache" ) {
1821- cache_params.mode = SD_CACHE_UCACHE;
1822- cache_params.reuse_threshold = 1 .0f ;
1823- cache_params.start_percent = 0 .15f ;
1824- cache_params.end_percent = 0 .95f ;
1825- cache_params.error_decay_rate = 1 .0f ;
1826- cache_params.use_relative_threshold = true ;
1827- cache_params.reset_error_on_compute = true ;
1794+ cache_params.mode = SD_CACHE_UCACHE;
18281795 } else if (cache_mode == " dbcache" ) {
1829- cache_params.mode = SD_CACHE_DBCACHE;
1830- cache_params.Fn_compute_blocks = 8 ;
1831- cache_params.Bn_compute_blocks = 0 ;
1832- cache_params.residual_diff_threshold = 0 .08f ;
1833- cache_params.max_warmup_steps = 8 ;
1796+ cache_params.mode = SD_CACHE_DBCACHE;
18341797 } else if (cache_mode == " taylorseer" ) {
1835- cache_params.mode = SD_CACHE_TAYLORSEER;
1836- cache_params.Fn_compute_blocks = 8 ;
1837- cache_params.Bn_compute_blocks = 0 ;
1838- cache_params.residual_diff_threshold = 0 .08f ;
1839- cache_params.max_warmup_steps = 8 ;
1798+ cache_params.mode = SD_CACHE_TAYLORSEER;
18401799 } else if (cache_mode == " cache-dit" ) {
1841- cache_params.mode = SD_CACHE_CACHE_DIT;
1842- cache_params.Fn_compute_blocks = 8 ;
1843- cache_params.Bn_compute_blocks = 0 ;
1844- cache_params.residual_diff_threshold = 0 .08f ;
1845- cache_params.max_warmup_steps = 8 ;
1800+ cache_params.mode = SD_CACHE_CACHE_DIT;
18461801 } else if (cache_mode == " spectrum" ) {
1847- cache_params.mode = SD_CACHE_SPECTRUM;
1848- cache_params.spectrum_w = 0 .40f ;
1849- cache_params.spectrum_m = 3 ;
1850- cache_params.spectrum_lam = 1 .0f ;
1851- cache_params.spectrum_window_size = 2 ;
1852- cache_params.spectrum_flex_window = 0 .50f ;
1853- cache_params.spectrum_warmup_steps = 4 ;
1854- cache_params.spectrum_stop_percent = 0 .9f ;
1802+ cache_params.mode = SD_CACHE_SPECTRUM;
18551803 }
18561804
18571805 if (!cache_option.empty ()) {
0 commit comments