mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
fix: only check model type if config exists
This commit is contained in:
parent
8648212c76
commit
7d97ee82a1
@ -1430,7 +1430,11 @@ class FlashCausalLM(Model):
|
||||
else:
|
||||
state = None
|
||||
|
||||
if self.model.config.model_type == "qwen2_vl":
|
||||
if (
|
||||
hasattr(self.model, "config")
|
||||
and hasattr(self.model.config, "model_type")
|
||||
and self.model.config.model_type == "qwen2_vl"
|
||||
):
|
||||
if position_ids.dim() == 1:
|
||||
position_ids = self.model.get_position_ids(input_ids)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user