Fix: Implement deepseek moe for moe_impl == "eager" to solve oom.
#12
by
tulvgengenr - opened
- hunyuan_image_3_pipeline.py +11 -6
hunyuan_image_3_pipeline.py
CHANGED
|
@@ -814,12 +814,17 @@ class HunyuanImage3Text2ImagePipeline(DiffusionPipeline):
|
|
| 814 |
# Taylor cache
|
| 815 |
cache_dic = None
|
| 816 |
if self.model.use_taylor_cache:
|
| 817 |
-
cache_dic = cache_init(
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 823 |
print(f"***use_taylor_cache: {self.model.use_taylor_cache}, cache_dic: {cache_dic}")
|
| 824 |
|
| 825 |
with self.progress_bar(total=num_inference_steps) as progress_bar:
|
|
|
|
| 814 |
# Taylor cache
|
| 815 |
cache_dic = None
|
| 816 |
if self.model.use_taylor_cache:
|
| 817 |
+
cache_dic = cache_init(
|
| 818 |
+
cache_interval=self.model.taylor_cache_interval,
|
| 819 |
+
max_order=self.model.taylor_cache_order,
|
| 820 |
+
num_steps=len(timesteps),
|
| 821 |
+
enable_first_enhance=self.model.taylor_cache_enable_first_enhance,
|
| 822 |
+
first_enhance_steps=self.model.taylor_cache_first_enhance_steps,
|
| 823 |
+
enable_tailing_enhance=self.model.taylor_cache_enable_tailing_enhance,
|
| 824 |
+
tailing_enhance_steps=self.model.taylor_cache_tailing_enhance_steps,
|
| 825 |
+
low_freqs_order=self.model.taylor_cache_low_freqs_order,
|
| 826 |
+
high_freqs_order=self.model.taylor_cache_high_freqs_order
|
| 827 |
+
)
|
| 828 |
print(f"***use_taylor_cache: {self.model.use_taylor_cache}, cache_dic: {cache_dic}")
|
| 829 |
|
| 830 |
with self.progress_bar(total=num_inference_steps) as progress_bar:
|