Fix model id for captioner
Browse files
app.py
CHANGED
|
@@ -16,11 +16,12 @@ def load_models_cpu():
|
|
| 16 |
# BLIP-2 (smaller/CPU-friendlier checkpoint)
|
| 17 |
# You can switch to "Salesforce/blip2-flan-t5-xl" if you prefer (slower on CPU).
|
| 18 |
_captioner = pipeline(
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
if _tts is None:
|
| 26 |
# Multilingual XTTS-v2 (runs on CPU; first load may take a bit)
|
|
|
|
| 16 |
# BLIP-2 (smaller/CPU-friendlier checkpoint)
|
| 17 |
# You can switch to "Salesforce/blip2-flan-t5-xl" if you prefer (slower on CPU).
|
| 18 |
_captioner = pipeline(
|
| 19 |
+
task="image-to-text",
|
| 20 |
+
model="Salesforce/blip2-flan-t5-xl",
|
| 21 |
+
torch_dtype=torch.float32, # CPU
|
| 22 |
+
device_map=None, # CPU
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
|
| 26 |
if _tts is None:
|
| 27 |
# Multilingual XTTS-v2 (runs on CPU; first load may take a bit)
|