Skip to content

Commit

Permalink
fix Idefics2VisionConfig type annotation (#33103)
Browse files Browse the repository at this point in the history
* fix Idefics2VisionConfig type annotation

* Update modeling_idefics2.py

* Update modeling_idefics2.py

add ignore copy

* Update modeling_idefics2.py

* Update modeling_idefics2.py
  • Loading branch information
chenzizhao authored Aug 27, 2024
1 parent d1f39c4 commit 834ec7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/idefics2/modeling_idefics2.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def forward(self, hidden_state):


class Idefics2EncoderLayer(nn.Module):
def __init__(self, config: Idefics2Config):
def __init__(self, config: Idefics2VisionConfig):
super().__init__()
self.embed_dim = config.hidden_size
self.self_attn = IDEFICS_VISION_ATTENTION_CLASSES[config._attn_implementation](config)
Expand Down

0 comments on commit 834ec7b

Please sign in to comment.