Commit 64a9c845 authored by Your Name's avatar Your Name

Rename 'vision' to 'image_to_text' for consistency

parent 69fe4af0
...@@ -46,7 +46,7 @@ from dataclasses import dataclass, field ...@@ -46,7 +46,7 @@ from dataclasses import dataclass, field
class ModelCapabilities: class ModelCapabilities:
"""Represents what a model can do.""" """Represents what a model can do."""
text_generation: bool = False # LLM/chat completion text_generation: bool = False # LLM/chat completion
vision: bool = False # Image understanding image_to_text: bool = False # Image understanding (captioning, VQA)
image_generation: bool = False # Text-to-image (Stable Diffusion) image_generation: bool = False # Text-to-image (Stable Diffusion)
speech_to_text: bool = False # Audio transcription speech_to_text: bool = False # Audio transcription
text_to_speech: bool = False # Speech synthesis text_to_speech: bool = False # Speech synthesis
...@@ -55,8 +55,8 @@ class ModelCapabilities: ...@@ -55,8 +55,8 @@ class ModelCapabilities:
caps = [] caps = []
if self.text_generation: if self.text_generation:
caps.append("text") caps.append("text")
if self.vision: if self.image_to_text:
caps.append("vision") caps.append("image-to-text")
if self.image_generation: if self.image_generation:
caps.append("image") caps.append("image")
if self.speech_to_text: if self.speech_to_text:
...@@ -83,9 +83,9 @@ def detect_model_capabilities(model_name: str) -> ModelCapabilities: ...@@ -83,9 +83,9 @@ def detect_model_capabilities(model_name: str) -> ModelCapabilities:
caps.image_generation = True caps.image_generation = True
return caps # Usually SD models are dedicated return caps # Usually SD models are dedicated
# Check for vision models # Check for vision models (image-to-text)
if any(x in name_lower for x in ['vision', 'vl-', '-vl', 'llava', 'qwen2-vl', 'qwen-vl', 'phi-4-mini', 'pixtral', 'clip']): if any(x in name_lower for x in ['vision', 'vl-', '-vl', 'llava', 'qwen2-vl', 'qwen-vl', 'phi-4-mini', 'pixtral', 'clip']):
caps.vision = True caps.image_to_text = True
caps.text_generation = True # Vision models are also LLMs caps.text_generation = True # Vision models are also LLMs
return caps return caps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment