Fix: Restore backward compatibility for precompute_freqs_cis import (#11660)

Add re-export of precompute_freqs_cis in comfy.ldm.lightricks.model to
maintain backward compatibility with custom nodes that import from the
old location. The function was moved to comfy.text_encoders.llama in a
January 2026 refactor, breaking custom nodes like ComfyUI-TeaCache,
ComfyUI-MagCache, and LightSpeed.

This shim allows existing custom nodes to continue working while
providing a clear deprecation notice for developers to update their
imports. The re-export will be removed in v2.0.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-02-14 12:33:36 +00:00
parent dc9822b7df
commit aaa9609a73

View File

@@ -14,6 +14,10 @@ import comfy.ldm.common_dit
from .symmetric_patchifier import SymmetricPatchifier, latent_to_pixel_coords
# DEPRECATED: Import from comfy.text_encoders.llama instead
# This re-export will be removed in v2.0
from comfy.text_encoders.llama import precompute_freqs_cis
def _log_base(x, base):
return np.log(x) / np.log(base)