Skip to content

Commit c790403

Browse files
authored
QwenVL: add skipped keys in setattr as well (#41808)
add the keys in setattr as well
1 parent 8012f80 commit c790403

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/transformers/models/qwen2_5_vl/configuration_qwen2_5_vl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def __init__(
304304
def __setattr__(self, key, value):
305305
if (
306306
(text_config := super().__getattribute__("__dict__").get("text_config")) is not None
307-
and key not in ["dtype", "_attn_implementation_internal"]
307+
and key not in ["_name_or_path", "model_type", "dtype", "_attn_implementation_internal"]
308308
and key in text_config.__dict__
309309
):
310310
setattr(text_config, key, value)

src/transformers/models/qwen2_vl/configuration_qwen2_vl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def __init__(
292292
def __setattr__(self, key, value):
293293
if (
294294
(text_config := super().__getattribute__("__dict__").get("text_config")) is not None
295-
and key not in ["dtype", "_attn_implementation_internal"]
295+
and key not in ["_name_or_path", "model_type", "dtype", "_attn_implementation_internal"]
296296
and key in text_config.__dict__
297297
):
298298
setattr(text_config, key, value)

0 commit comments

Comments
 (0)