KJNodes/deprecatedgenerated

WanVideo Tea Cache (native)(WanVideoTeaCacheKJ)

This node achieves its functionality by patching the input model.

Wan Video Tea Cache KJ

model
model
rel_l1_thresh
0.275
start_percent
0.10
end_percent
1.00
cache_device
offload_device
coefficients
i2v_480
KJNodes

The WanVideo Tea Cache (native) node implements its functionality by patching the input model. This node is deprecated. Use the native EasyCache or another up-to-date alternative node instead.

The WanVideo Tea Cache (native) node is an optimization tool designed to accelerate the inference process of WanVideo models. Its core function is to cache intermediate calculation results and reuse the cache when specific conditions are met, thereby skipping certain computational steps and significantly improving the efficiency of video generation or processing.

Node Functionality

This node implements its functionality by patching the input model. Its core mechanism is based on a relative L1 distance threshold to determine when to apply the cache, representing a trade-off strategy between generation speed and result accuracy. The node supports selecting preset scaling coefficients for different WanVideo model variants (e.g., 1.3B, 14B) to optimize the accuracy of cache decisions. It also allows manually disabling coefficients for more basic adjustments.

Node Parameter Description - WanVideo Tea Cache (native)

Inputs

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
modelMODELYes--model (Output Parameter): Outputs the model with the TeaCache optimization strategy applied, ready for use by subsequent sampling nodes.

Parameters

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
cache_deviceCOMBOYesoffload_device"main_device", "offload_device"cache_device (Input Parameter): Selects the device for storing cached data. Options are "main_device" (main device) or "offload_device" (offload device), used for managing memory or VRAM usage.
coefficientsCOMBOYesi2v_480"disabled", "1.3B", "14B", "i2v_480", "i2v_720"coefficients (Input Parameter): Selects preset coefficients for rescaling the relative L1 distance. Options include "disabled" and presets for different models (1.3B, 14B) and resolutions (i2v_480, i2v_720). When disabled, smaller thresholds are required.
rel_l1_threshFLOATYes0.2750.0 - 10.0 (Step: 0.001)Threshold for to determine when to apply the cache, compromise between speed and accuracy. When using coefficients a good value range is something between 0.2-0.4 for all but 1.3B model, which should be about 10 times smaller, same as when not using coefficients.
start_percentFLOATYes0.10.0 - 1.0 (Step: 0.01)The start percentage of the steps to use with TeaCache.
end_percentFLOATYes1.00.0 - 1.0 (Step: 0.01)The end percentage of the steps to use with TeaCache.

Outputs

Parameter NameData TypeDescription
modelMODELmodel (Output Parameter): Outputs the model with the TeaCache optimization strategy applied, ready for use by subsequent sampling nodes.

Usage Scenarios

In a video generation workflow, this node is typically connected before a KSampler or similar sampler. For example, when using a WanVideo model to generate a coherent video, users can first process the model through this node. By adjusting the threshold and start/end percentages, it's possible to skip certain sampling steps while ensuring motion fluidity, thereby accelerating the generation speed of the entire video sequence.

Notes

This node has been marked as "deprecated," meaning it may no longer be maintained or provided in future versions of ComfyUI or related plugins. Users are advised to pay attention to subsequent alternative solutions. The recommended alternative is the native EasyCache node, or another up-to-date custom node. When using this node, note that early steps (e.g., if the start percentage is set too low) should not be skipped, as this may impair the dynamic effects of the generated video.

The WanVideo Tea Cache (native) node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…