Spaces:
Configuration error
Configuration error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -138,7 +138,7 @@ def initialize_models(use_api_mode=False):
|
|
| 138 |
def __init__(self, **kwargs):
|
| 139 |
super().__init__(**kwargs)
|
| 140 |
self._model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 141 |
-
self.model_name, torch_dtype=torch.bfloat16, device_map='
|
| 142 |
)
|
| 143 |
self._processor = AutoProcessor.from_pretrained(self.model_name)
|
| 144 |
|
|
|
|
| 138 |
def __init__(self, **kwargs):
|
| 139 |
super().__init__(**kwargs)
|
| 140 |
self._model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 141 |
+
self.model_name, torch_dtype=torch.bfloat16, device_map='auto'
|
| 142 |
)
|
| 143 |
self._processor = AutoProcessor.from_pretrained(self.model_name)
|
| 144 |
|