From fc0e38f1b5a16dda226f8ab379832613544ee076 Mon Sep 17 00:00:00 2001 From: siwer Date: Fri, 27 Sep 2024 09:14:53 +0200 Subject: [PATCH] Update transformer.py Proposed fix for issue #225 --- src/mistral_inference/transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mistral_inference/transformer.py b/src/mistral_inference/transformer.py index 9c9aebe..484b02e 100644 --- a/src/mistral_inference/transformer.py +++ b/src/mistral_inference/transformer.py @@ -159,7 +159,7 @@ def forward_partial( if self.pipeline_rank == 0: assert self.tok_embeddings is not None - if self.vision_encoder is not None and images: + if self.vision_encoder is not None and images is not None: h = self.embed_vision_language_features(input_ids, images) else: h = self.tok_embeddings(input_ids)