From 834ec7b1ccf9b82905d5803aca41e1744849dae7 Mon Sep 17 00:00:00 2001 From: Zizhao Chen Date: Tue, 27 Aug 2024 08:43:28 -0400 Subject: [PATCH] fix Idefics2VisionConfig type annotation (#33103) * fix Idefics2VisionConfig type annotation * Update modeling_idefics2.py * Update modeling_idefics2.py add ignore copy * Update modeling_idefics2.py * Update modeling_idefics2.py --- src/transformers/models/idefics2/modeling_idefics2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/models/idefics2/modeling_idefics2.py b/src/transformers/models/idefics2/modeling_idefics2.py index 4d3db3208d773f..5d4f8e408eb0cc 100644 --- a/src/transformers/models/idefics2/modeling_idefics2.py +++ b/src/transformers/models/idefics2/modeling_idefics2.py @@ -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)