@@ -104,6 +104,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
104104 magcache_thresh = config .magcache_thresh ,
105105 magcache_K = config .magcache_K ,
106106 retention_ratio = config .retention_ratio ,
107+ use_kv_cache = config .use_kv_cache ,
107108 )
108109 elif model_key == WAN2_2 :
109110 return pipeline (
@@ -118,6 +119,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
118119 guidance_scale_high = config .guidance_scale_high ,
119120 use_cfg_cache = config .use_cfg_cache ,
120121 use_sen_cache = config .use_sen_cache ,
122+ use_kv_cache = config .use_kv_cache ,
121123 )
122124 else :
123125 raise ValueError (f"Unsupported model_name for I2V in config: { model_key } " )
@@ -136,6 +138,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
136138 magcache_thresh = config .magcache_thresh ,
137139 magcache_K = config .magcache_K ,
138140 retention_ratio = config .retention_ratio ,
141+ use_kv_cache = config .use_kv_cache ,
139142 )
140143 elif model_key == WAN2_2 :
141144 return pipeline (
@@ -149,6 +152,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
149152 guidance_scale_high = config .guidance_scale_high ,
150153 use_cfg_cache = config .use_cfg_cache ,
151154 use_sen_cache = config .use_sen_cache ,
155+ use_kv_cache = getattr (config , "use_kv_cache" , False ),
152156 )
153157 else :
154158 raise ValueError (f"Unsupported model_name for T2Vin config: { model_key } " )
0 commit comments