Skip to content

AttributeError: 'Gemma3TextConfig' object has no attribute 'rope_local_base_freq' when running pipeline #116

@lhphanto

Description

@lhphanto
(ltx2) [../data/users/lxh/LTX-2 (main)]$ python -m ltx_pipelines.ti2vid_two_stages     --checkpoint-path ./ltx2_weights/ltx-2-19b-distilled-fp8.safetensors     --distilled-lora ./ltx2_weights/ltx-2-19b-distilled-lora-384.safetensors 0.8     --spatial-upsampler-path ./ltx2_weights/ltx-2-spatial-upscaler-x2-1.0.safetensors     --gemma-root ./gemma     --prompt "A beautiful sunset over the ocean"     --output-path output.mp4
<frozen runpy>:128: RuntimeWarning: 'ltx_pipelines.ti2vid_two_stages' found in sys.modules after import of package 'ltx_pipelines', but prior to execution of 'ltx_pipelines.ti2vid_two_stages'; this may result in unpredictable behaviour
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/data/users/lxh/LTX-2/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py", line 299, in <module>
    main()
  File "/home/lxh/.conda/envs/ltx2/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/lxh/LTX-2/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py", line 259, in main
    video, audio = pipeline(
                   ^^^^^^^^^
  File "/home/lxh/.conda/envs/ltx2/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/lxh/LTX-2/packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py", line 105, in __call__
    text_encoder = self.stage_1_model_ledger.text_encoder()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/lxh/LTX-2/packages/ltx-pipelines/src/ltx_pipelines/utils/model_ledger.py", line 235, in text_encoder
    return self.text_encoder_builder.build(device=self._target_device(), dtype=self.dtype).to(self.device).eval()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/lxh/LTX-2/packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py", line 75, in build
    meta_model = self.meta_model(config, self.module_ops)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/lxh/LTX-2/packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py", line 51, in meta_model
    model = module_op.mutator(model)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/lxh/LTX-2/packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/av_encoder.py", line 135, in create_and_populate
    base = config.rope_local_base_freq
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lxh/.conda/envs/ltx2/lib/python3.12/site-packages/transformers/configuration_utils.py", line 164, in __getattribute__
    return super().__getattribute__(key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Gemma3TextConfig' object has no attribute 'rope_local_base_freq'

Has anyone encountered similar issues? I think the code is not compatible with the gemma I downloaded. But it seems like the gemma3 repo hasn't changed for the last 10 months?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions