Maria604 commited on
Commit
f3893fa
·
1 Parent(s): 9aa9151

Fix model id for captioner

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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
- task="image-to-text",
20
- model="Salesforce/blip2-flan-t5-large",
21
- torch_dtype=torch.float32,
22
- device_map=None, # ensure CPU
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)