From aaa9609a73c8701e171194b67f01970cfab6eee0 Mon Sep 17 00:00:00 2001 From: snomiao Date: Sat, 14 Feb 2026 12:33:36 +0000 Subject: [PATCH] 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 --- comfy/ldm/lightricks/model.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comfy/ldm/lightricks/model.py b/comfy/ldm/lightricks/model.py index d61e19d6e..81328ae94 100644 --- a/comfy/ldm/lightricks/model.py +++ b/comfy/ldm/lightricks/model.py @@ -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)