Skip to content

Commit 73b20a6

Browse files
committed
Extra safe if-condition.
1 parent 825030f commit 73b20a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/models/glm4v_moe/test_modeling_glm4v_moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def setUpClass(cls):
300300

301301
@classmethod
302302
def get_model(cls):
303-
if cls.model is None:
303+
if not hasattr(cls, "model") or cls.model is None:
304304
cls.model = Glm4vMoeForConditionalGeneration.from_pretrained(
305305
"zai-org/GLM-4.5V", dtype="auto", device_map="auto"
306306
)

0 commit comments

Comments
 (0)