m7mdal7aj commited on
Commit
33ddd8a
1 Parent(s): 3eeb25f

Update my_model/KBVQA.py

Browse files
Files changed (1) hide show
  1. my_model/KBVQA.py +5 -1
my_model/KBVQA.py CHANGED
@@ -294,10 +294,14 @@ def prepare_kbvqa_model(only_reload_detection_model: bool = False, force_reload:
294
  """
295
 
296
  if force_reload:
297
- loading_message = 'Force Reloading model.. this should take no more than a few minutes!'
 
298
  try:
299
  del kbvqa
 
 
300
  except:
 
301
  free_gpu_resources()
302
  pass
303
  free_gpu_resources()
 
294
  """
295
 
296
  if force_reload:
297
+ free_gpu_resources()
298
+ loading_message = 'Reloading model.. this should take no more than 2 or 3 minutes!'
299
  try:
300
  del kbvqa
301
+ free_gpu_resources()
302
+ free_gpu_resources()
303
  except:
304
+ free_gpu_resources()
305
  free_gpu_resources()
306
  pass
307
  free_gpu_resources()