Skip to content

Fix ImportError: precompute_freqs_cis is now _precompute_freqs_cis on LTXBaseModel#481

Open
Marcel (goodguy1963) wants to merge 1 commit into
Lightricks:masterfrom
goodguy1963:fix/precompute-freqs-cis-import
Open

Fix ImportError: precompute_freqs_cis is now _precompute_freqs_cis on LTXBaseModel#481
Marcel (goodguy1963) wants to merge 1 commit into
Lightricks:masterfrom
goodguy1963:fix/precompute-freqs-cis-import

Conversation

@goodguy1963
Copy link
Copy Markdown

Problem

The ComfyUI core recently refactored precompute_freqs_cis from a standalone function in comfy.ldm.lightricks.model to a private method _precompute_freqs_cis on the LTXBaseModel class.

This causes the following error when loading ComfyUI-LTXVideo:

ImportError: cannot import name 'precompute_freqs_cis' from 'comfy.ldm.lightricks.model'

Fix

  1. Removed precompute_freqs_cis from the import statement in tricks/modules/ltx_model.py
  2. Changed the call site in LTXVModelModified.forward() from precompute_freqs_cis(...) to self._precompute_freqs_cis(...)

Since LTXVModelModified extends LTXVModelLTXBaseModel, all required instance attributes (split_positional_embedding, freq_grid_generator) are available via self.

Testing

Verified the module imports successfully in the target ComfyUI environment.

… LTXBaseModel

The standalone function precompute_freqs_cis was refactored to a private method _precompute_freqs_cis on the LTXBaseModel class in the ComfyUI core. Update the import and call site in LTXVModelModified.forward() to use self._precompute_freqs_cis() instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant