Skip to content

PaliGemma (and probably SigLIP) inference broken in latest transformers version #33929

@mranzinger

Description

@mranzinger

This seems like a breaking change. When I run this model with transformers==4.44.2, things work fine. However, when running with transformers==4.25.1, it fails with this error:


...

    num_positions = self.position_embeddings.shape[1]

  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1687, in __getattr__

    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")

AttributeError: 'SiglipVisionEmbeddings' object has no attribute 'position_embeddings'. Did you mean: 'position_embedding'?

Originally posted by @mranzinger in c6d2848

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