tyriaa commited on
Commit
7d9f9ef
1 Parent(s): e741324

Initial commit15323p

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -113,8 +113,9 @@ load_training_status()
113
  os.environ["TORCH_CUDNN_SDPA_ENABLED"] = "0"
114
 
115
  # Initialize SAM Predictor
116
- MODEL_CFG = r"project/sam2/sam2_hiera_l.yaml"
117
- CHECKPOINT = r"project/sam2/sam2.1_hiera_large.pt"
 
118
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
119
  predictor = Predictor(MODEL_CFG, CHECKPOINT, DEVICE)
120
 
 
113
  os.environ["TORCH_CUDNN_SDPA_ENABLED"] = "0"
114
 
115
  # Initialize SAM Predictor
116
+ MODEL_CFG = os.path.join(BASE_DIR, "sam2", "sam2_hiera_l.yaml")
117
+ CHECKPOINT = os.path.join(BASE_DIR, "sam2", "sam2.1_hiera_large.pt")
118
+ print(f"Chargement de {MODEL_CFG} et {CHECKPOINT} sur l'appareil .")
119
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
120
  predictor = Predictor(MODEL_CFG, CHECKPOINT, DEVICE)
121