Skip to content

Commit 3657f7f

Browse files
committed
Support HiDream-I1-Full and redesigns TeaCache options
1 parent efe0653 commit 3657f7f

12 files changed

Lines changed: 1402 additions & 490 deletions

README.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@ Timestep Embedding Aware Cache ([TeaCache](https://github.com/ali-vilab/TeaCache
66
TeaCache has now been integrated into ComfyUI and is compatible with the ComfyUI native nodes. ComfyUI-TeaCache is easy to use, simply connect the TeaCache node with the ComfyUI native nodes for seamless usage.
77

88
## Updates
9+
- May 22 2025: ComfyUI-TeaCache supports HiDream-I1-Full and redesigns TeaCache options:
10+
- It can achieve a 1.5x lossless speedup and a 2x speedup without much visual quality degradation.
11+
- Support HiDream-I1-Full LoRA!
12+
- Add start_percent, end_percent options and remove max_skip_steps option according to the feedback from [1](https://github.com/welltop-cn/ComfyUI-TeaCache/issues/112) and [2](https://github.com/welltop-cn/ComfyUI-TeaCache/issues/84).
13+
- Fix compatibility issues to match the latest official ComfyUI version.
914
- Mar 26 2025: ComfyUI-TeaCache supports retention mode for Wan2.1 models and HunyuanVideo I2V v2 model:
1015
- Retention mode for Wan2.1 models can bring faster generation and better generation quality.
1116
- Fixes a bug about HunyuanVideo I2V v2 model.
1217
- Mar 10 2025: ComfyUI-TeaCache adds max_skip_steps option and has made some changes for ease of use:
1318
- Add max_skip_steps option to enjoy a good trade-off between quality and speed for Wan2.1 models. The best settings are shown in the usage section.
1419
- Merge TeaCache For Img Gen and TeaCache For Vid Gen nodes into a single TeaCache node.
15-
- Update TeaCache for HunyuanVideo and LTX-Video to match the offical ComfyUI update.
20+
- Fix compatibility issues about HunyuanVideo and LTX-Video to match the latest official ComfyUI version.
1621
- Mar 6 2025: ComfyUI-TeaCache supports Wan2.1:
1722
- It can achieve a 1.5x lossless speedup and a 2x speedup without much visual quality degradation.
1823
- Support Text to Video and Image to Video!
@@ -48,31 +53,32 @@ Installation via ComfyUI-Manager is preferred. Simply search for ComfyUI-TeaCach
4853

4954
## Usage
5055
### TeaCache
51-
To use TeaCache node, simply add `TeaCache` node to your workflow after `Load Diffusion Model` node or `Load LoRA` node (if you need LoRA). Generally, TeaCache can achieve a speedup of 1.5x to 3x with acceptable visual quality loss. The following table gives the recommended rel_l1_thresh and max_skip_steps ​for different models:
56+
To use TeaCache node, simply add `TeaCache` node to your workflow after `Load Diffusion Model` node or `Load LoRA` node (if you need LoRA). Generally, TeaCache can achieve a speedup of 1.5x to 3x with acceptable visual quality loss. The following table gives the recommended rel_l1_thresh, start_percent and end_percent ​for different models:
5257

5358
<div align="center">
5459

55-
| Models | rel_l1_thresh | max_skip_steps | speedup |
56-
|:----------------------------:|:-----------------:|:-----------------:|:-----------------:|
57-
| FLUX | 0.4 | 3 | ~2x |
58-
| PuLID-FLUX | 0.4 | 3 | ~1.7x |
59-
| HunyuanVideo | 0.15 | 3 | ~1.9x |
60-
| LTX-Video | 0.06 | 3 | ~1.7x |
61-
| CogVideoX | 0.3 | 3 | ~2x |
62-
| Wan2.1-T2V-1.3B | 0.08 | 3 | ~1.6x |
63-
| Wan2.1-T2V-14B | 0.2 | 3 | ~1.8x |
64-
| Wan2.1-I2V-480P-14B | 0.26 | 3 | ~1.9x |
65-
| Wan2.1-I2V-720P-14B | 0.25 | 3 | ~1.6x |
66-
| Wan2.1-T2V-1.3B-ret-mode | 0.15 | 3 | ~2.2x |
67-
| Wan2.1-T2V-14B-ret-mode | 0.2 | 3 | ~2.1x |
68-
| Wan2.1-I2V-480P-14B-ret-mode | 0.3 | 3 | ~2.3x |
69-
| Wan2.1-I2V-720P-14B-ret-mode | 0.3 | 3 | ~2.0x |
60+
| Models | rel_l1_thresh | start_percent | end_percent | speedup |
61+
|:----------------------------:|:-----------------:|:-----------------:|:-----------------:|:-----------------:|
62+
| FLUX | 0.4 | 0 | 1 | ~2x |
63+
| PuLID-FLUX | 0.4 | 0 | 1 | ~1.7x |
64+
| HiDream-I1-Full | 0.35 | 0.1 | 1 | ~2x |
65+
| HunyuanVideo | 0.15 | 0 | 1 | ~1.9x |
66+
| LTX-Video | 0.06 | 0 | 1 | ~1.7x |
67+
| CogVideoX | 0.3 | 0 | 1 | ~2x |
68+
| Wan2.1-T2V-1.3B | 0.08 | 0 | 1 | ~1.6x |
69+
| Wan2.1-T2V-14B | 0.2 | 0 | 1 | ~1.8x |
70+
| Wan2.1-I2V-480P-14B | 0.26 | 0 | 1 | ~1.9x |
71+
| Wan2.1-I2V-720P-14B | 0.25 | 0 | 1 | ~1.6x |
72+
| Wan2.1-T2V-1.3B-ret-mode | 0.15 | 0.1 | 1 | ~2.2x |
73+
| Wan2.1-T2V-14B-ret-mode | 0.2 | 0.1 | 1 | ~2.1x |
74+
| Wan2.1-I2V-480P-14B-ret-mode | 0.3 | 0.1 | 1 | ~2.3x |
75+
| Wan2.1-I2V-720P-14B-ret-mode | 0.3 | 0.1 | 1 | ~2x |
7076

7177
</div>
7278

73-
If the video after applying TeaCache is of low quality, such as a lower range of motion or the still frames, please reduce rel_l1_thresh or max_skip_steps.
79+
If the image/video after applying TeaCache is of low quality, please reduce rel_l1_thresh. I really don't recommend adjusting start_percent and end_percent unless you are an experienced engineer or creator.
7480

75-
The demo workflows ([flux](./examples/flux.json), [pulid_flux](./examples/pulid_flux.json), [hunyuanvideo](./examples/hunyuanvideo.json), [ltx_video](./examples/ltx_video.json), [cogvideox](./examples/cogvideox.json), [wan2.1_t2v](./examples/wan2.1_t2v.json) and [wan2.1_i2v](./examples/wan2.1_i2v.json)) are placed in examples folder.
81+
The demo workflows ([flux](./examples/flux.json), [pulid_flux](./examples/pulid_flux.json), [hidream_i1_full](./examples/hidream_i1_full.json), [hunyuanvideo](./examples/hunyuanvideo.json), [ltx_video](./examples/ltx_video.json), [cogvideox](./examples/cogvideox.json), [wan2.1_t2v](./examples/wan2.1_t2v.json) and [wan2.1_i2v](./examples/wan2.1_i2v.json)) are placed in examples folder.
7682

7783
### Compile Model
7884
To use Compile Model node, simply add `Compile Model` node to your workflow after `Load Diffusion Model` node or `TeaCache` node. Compile Model uses `torch.compile` to enhance the model performance by compiling model into more efficient intermediate representations (IRs). This compilation process leverages backend compilers to generate optimized code, which can significantly speed up inference. The compilation may take long time when you run the workflow at first, but once it is compiled, inference is extremely fast. The usage is shown below:
@@ -85,6 +91,9 @@ To use Compile Model node, simply add `Compile Model` node to your workflow afte
8591
- <p><strong>PuLID-FLUX</strong></p>
8692
![](./assets/compare_pulid_flux.png)
8793

94+
- <p><strong>HiDream-I1-Full</strong></p>
95+
![](./assets/compare_hidream_i1_full.png)
96+
8897
- <p><strong>HunyuanVideo</strong></p>
8998
https://github.com/user-attachments/assets/b3aca64d-c2ae-440c-a362-f3a7b6c633e0
9099

assets/compare_hidream_i1_full.png

928 KB
Loading

assets/compile.png

16.8 KB
Loading

0 commit comments

Comments
 (0)