From f340fba14b1dad1689360a1679786b8c5485f8dd Mon Sep 17 00:00:00 2001 From: roverdude24 <116471472+roverdude24@users.noreply.github.com> Date: Fri, 23 Jan 2026 06:45:01 +0700 Subject: [PATCH] Fix precompute_freqs_cis import for ComfyUI 0.10.0 compatibility Changed import from precompute_freqs_cis to LTXBaseModel and updated usage to call the class method instead of the standalone function. Fixes #178 Co-Authored-By: Warp --- nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 04bff4a..16cb590 100644 --- a/nodes.py +++ b/nodes.py @@ -9,7 +9,7 @@ from unittest.mock import patch from comfy.ldm.flux.layers import timestep_embedding, apply_mod -from comfy.ldm.lightricks.model import precompute_freqs_cis +from comfy.ldm.lightricks.model import LTXBaseModel from comfy.ldm.lightricks.symmetric_patchifier import latent_to_pixel_coords from comfy.ldm.wan.model import sinusoidal_embedding_1d @@ -628,7 +628,7 @@ def teacache_ltxvmodel_forward( if attention_mask is not None and not torch.is_floating_point(attention_mask): attention_mask = (attention_mask - 1).to(x.dtype).reshape((attention_mask.shape[0], 1, -1, attention_mask.shape[-1])) * torch.finfo(x.dtype).max - pe = precompute_freqs_cis(fractional_coords, dim=self.inner_dim, out_dtype=x.dtype) + pe = LTXBaseModel.precompute_freqs_cis(fractional_coords, dim=self.inner_dim, out_dtype=x.dtype) batch_size = x.shape[0] timestep, embedded_timestep = self.adaln_single(