rmoxon commited on
Commit
ccc4d30
·
verified ·
1 Parent(s): 94c9307

Re-apply encode_images_batch_gpu duration=90 after factory reboot cleared the NoneType model-load failure

Browse files

Root cause was NOT the duration value: both duration=90 and the revert to duration=45 failed identically ('NoneType' object is not callable, meaning siglip_model/siglip_processor were None -- the module-level model load itself was failing on restart, unrelated to this parameter). A factory reboot (api.restart_space(factory_reboot=True)) cleared it, confirmed by a clean 5-image test at duration=45. Re-applying 90 now that the Space is healthy again, to match the two-phase pipeline's IMAGE_PHASE_BATCH_SIZE=100 already live on the edge function side.

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -188,7 +188,7 @@ def encode_text_gpu(text: str) -> str:
188
  return json.dumps({"embedding": sanitize_vec(emb), "dimensions": OUTPUT_DIM})
189
 
190
 
191
- @spaces.GPU(duration=45)
192
  def encode_images_batch_gpu(image_urls_json: str) -> str:
193
  """Batch image encoding. Up to 200 URLs per call."""
194
  image_urls = json.loads(image_urls_json)
 
188
  return json.dumps({"embedding": sanitize_vec(emb), "dimensions": OUTPUT_DIM})
189
 
190
 
191
+ @spaces.GPU(duration=90)
192
  def encode_images_batch_gpu(image_urls_json: str) -> str:
193
  """Batch image encoding. Up to 200 URLs per call."""
194
  image_urls = json.loads(image_urls_json)