supersolar commited on
Commit
4baa394
·
verified ·
1 Parent(s): 2b7c8aa

Update kaggle_florence_gpu_1.py

Browse files
Files changed (1) hide show
  1. kaggle_florence_gpu_1.py +3 -3
kaggle_florence_gpu_1.py CHANGED
@@ -23,9 +23,9 @@ from utils.florencegpu1 import load_florence_model, run_florence_inference, \
23
  from utils.modes import IMAGE_INFERENCE_MODES, IMAGE_OPEN_VOCABULARY_DETECTION_MODE, \
24
  IMAGE_CAPTION_GROUNDING_MASKS_MODE, VIDEO_INFERENCE_MODES
25
  from utils.sam import load_sam_image_model, run_sam_inference, load_sam_video_model
26
- DEVICE = torch.device("cuda")
27
- DEVICE = [torch.device(f'cuda:{i}') for i in range(torch.cuda.device_count())][-1]
28
- #DEVICE = [torch.device(f'cuda:{i}') for i in range(torch.cuda.device_count())][0]
29
 
30
  torch.autocast(device_type="cuda", dtype=torch.bfloat16).__enter__()
31
  if torch.cuda.get_device_properties(0).major >= 8:
 
23
  from utils.modes import IMAGE_INFERENCE_MODES, IMAGE_OPEN_VOCABULARY_DETECTION_MODE, \
24
  IMAGE_CAPTION_GROUNDING_MASKS_MODE, VIDEO_INFERENCE_MODES
25
  from utils.sam import load_sam_image_model, run_sam_inference, load_sam_video_model
26
+ #DEVICE = torch.device("cuda")
27
+ #DEVICE = [torch.device(f'cuda:{i}') for i in range(torch.cuda.device_count())][-1]
28
+ DEVICE = [torch.device(f'cuda:{i}') for i in range(torch.cuda.device_count())][0]
29
 
30
  torch.autocast(device_type="cuda", dtype=torch.bfloat16).__enter__()
31
  if torch.cuda.get_device_properties(0).major >= 8: