Nodes Browser
ComfyDeploy: How ComfyUI_Patches_ll works in ComfyUI?
What is ComfyUI_Patches_ll?
Some patches for Flux|HunYuanVideo|LTXVideo etc, support TeaCache, PuLID, First Block Cache.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI_Patches_ll
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
Add some hooks method. Such as: TeaCache
and First Block Cache
for PuLID-Flux
Flux
HunYuanVideo
LTXVideo
MochiVideo
WanVideo
.
Need upgrade ComfyUI Version>=0.3.17
Preview (Image with WorkFlow)
Working with PuLID
(need my other custom nodes ComfyUI_PuLID_Flux_ll)
Install
- Manual
cd custom_nodes
git clone https://github.com/lldacing/ComfyUI_Patches_ll.git
# restart ComfyUI
Nodes
- FluxForwardOverrider
- Add some hooks method support to the
Flux
model
- Add some hooks method support to the
- VideoForwardOverrider
- Add some hooks method support to the video model. Support
HunYuanVideo
,LTXVideo
,MochiVideo
,WanVideo
- Add some hooks method support to the video model. Support
- DitForwardOverrider
- Auto add some hooks method for model (automatically identify model type). Support
Flux
,HunYuanVideo
,LTXVideo
,MochiVideo
,WanVideo
- Auto add some hooks method for model (automatically identify model type). Support
- ApplyTeaCachePatch
- Use the
hooks
provided in*ForwardOverrider
to supportTeaCache
acceleration. SupportFlux
,HunYuanVideo
,LTXVideo
,MochiVideo
,WanVideo
- In my test results, the video quality is not good after acceleration for
MochiVideo
- Use the
- ApplyTeaCachePatchAdvanced
- Support
start_at
andend_at
- Support
- ApplyFirstBlockCachePatch
- Use the
hooks
provided in*ForwardOverrider
to supportFirst Block Cache
acceleration. SupportFlux
,HunYuanVideo
,LTXVideo
,MochiVideo
,WanVideo
- In my test results, the video quality is not good after acceleration for
MochiVideo
- Use the
- ApplyFirstBlockCachePatchAdvanced
- Support
start_at
andend_at
- Support
SpeedUp reference
TeaCache (rel_l1_thresh value)
| | Original | 1.5x | 1.8x | 2.0x | |--------------|----------|------|------|------| | Flux | 0 | 0.25 | 0.4 | 0.6 | | HunYuanVideo | 0 | 0.1 | - | 0.15 | | LTXVideo | 0 | 0.03 | - | 0.05 | | MochiVideo | 0 | 0.06 | - | 0.09 | | WanVideo | 0 | - | - | - |
Note: "-" indicates small speedup, low quality or untested. WanVideo's different models have different acceleration effects.
First Block Cache (residual_diff_threshold value)
| | Original | 1.2x | 1.5x | 1.8x | |--------------|----------|------|------|------| | Flux | 0 | - | - | 0.12 | | HunYuanVideo | 0 | - | 0.1 | - | | LTXVideo | 0 | 0.05 | - | - | | MochiVideo | 0 | - | 0.03 | - | | WanVideo | 0 | - | 0.05 | - |
Note: "-" indicates small speedup, low quality or untested.