Update README.md

This commit is contained in:
唐焱鑫
2025-01-16 19:47:54 +08:00
committed by GitHub
parent 992a5b483c
commit a2fd005845
+9 -3
View File
@@ -6,13 +6,13 @@ Timestep Embedding Aware Cache ([TeaCache](https://github.com/ali-vilab/TeaCache
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.
## Updates
- Jan 15 2025: Thanks [@fantacytyx](https://github.com/fantacytyx), ComfyUI-TeaCache supports PuLID-FLUX and fixes bug about rel_l1_thresh:
- Jan 15 2025: Thanks [@TangYanxin](https://github.com/TangYanxin), ComfyUI-TeaCache supports PuLID-FLUX and fixes bug about rel_l1_thresh:
- It can achieve a 1.2x lossless speedup and a 1.7x speedup without much visual quality degradation.
- Fixes a bug about rel_l1_thresh, when there are multiple TeaCache nodes in a workflow, the rel_l1_thresh value is always the value of the last TeaCache node.
- Jan 14 2025: ComfyUI-TeaCache supports Compile Model and fixes a bug that TeaCache keeps forever even if we remove/bypass the node:
- Support Compile Model, now it can bring a faster inference when you add Compile Model node!
- Fixes a bug related to usability, now we can go back to the workflow state without TeaCache if we remove/bypass TeaCache node.
- Jan 13 2025: Thanks [@fantacytyx](https://github.com/fantacytyx), ComfyUI-TeaCache remove the Steps setting from the node:
- Jan 13 2025: Thanks [@TangYanxin](https://github.com/TangYanxin), ComfyUI-TeaCache remove the Steps setting from the node:
- Now, it works fine even if there are multiple sampling nodes with different sampling steps in the workflow.
- Fixes a bug, RuntimeError: The size of tensor a must match the size of tensor b at non-singleton dimension.
- Jan 10 2025: ComfyUI-TeaCache supports LTX-Video:
@@ -43,9 +43,15 @@ To use TeaCache node, simply add `TeaCache For Img Gen` or `TeaCache For Vid Gen
The demo workflows ([teacache_flux](./examples/teacache_flux.json), [teacache_pulid_flux](./examples/teacache_pulid_flux.json), [teacache_hunyuanvideo](./examples/teacache_hunyuanvideo.json), [teacache_ltx_video](./examples/teacache_ltx_video.json)) are placed in examples folder.
### Compile Model
To use Compile Model node, simply add `Compile Model` node to your workflow after 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:
To use Compile Model node, simply add `Compile Model` node to your workflow after your 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:
![](./assets/compile.png)
**NOTE:** The Compile Model node uses [torch.compile](https://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html), it requires your computation to meet some software and hardware requirements. If you have problems with the compileModel node, you can remove it from the workflow and only use the TeaCache node. The TeaCache node can still bring you a significant speedup.
**NOTE:** torch.compile does not work on Windows officially, you should not use The Compile Model node, or search on the internet how to make it work.
**NOTE:** Compiling a model with FP8 quantization requires GPUs after Ada like RTX 4090, you should try using FP16/BF16 models or removing the compilation node.
The demo workflows ([teacache_compile_flux](./examples/teacache_compile_flux.json), [teacache_compile_pulid_flux](./examples/teacache_compile_pulid_flux.json), [teacache_compile_hunyuanvideo](./examples/teacache_compile_hunyuanvideo.json), [teacache_compile_ltx_video](./examples/teacache_compile_ltx_video.json)) are also placed in examples folder.