Skip to content

Commit

Permalink
fix idefics3 vision model type checking (#164)
Browse files Browse the repository at this point in the history
* fix model type for vision.py

* bump
  • Loading branch information
Blaizzy authored Dec 30, 2024
1 parent 78920b0 commit 2a97875
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mlx_vlm/models/idefics3/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ class VisionModel(nn.Module):
def __init__(self, config: VisionConfig):
super().__init__()
self.model_type = config.model_type
if self.model_type != "siglip_vision_model" and self.model_type != "idefics3":
if self.model_type not in [
"siglip_vision_model",
"idefics3",
"idefics3_vision",
]:
raise ValueError(f"Unsupported model type: {self.model_type}")

self.embeddings = VisionEmbeddings(config)
Expand Down
2 changes: 1 addition & 1 deletion mlx_vlm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.7"
__version__ = "0.1.8"

0 comments on commit 2a97875

Please sign in to comment.