wondervictor commited on
Commit
ef4a9e6
·
verified ·
1 Parent(s): 0370e48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -96,7 +96,7 @@ def initialize_models(sam_path, adapter_pth, model_cfg, cfg):
96
 
97
  # Mask Adapter模型初始化
98
  if mask_adapter is None:
99
- mask_adapter = build_mask_adapter(cfg, "MASKAdapterHead").cuda()
100
  # 加载Adapter状态字典
101
  adapter_state_dict = torch.load(adapter_pth, map_location=torch.device('cpu'))
102
  mask_adapter.load_state_dict(adapter_state_dict)
 
96
 
97
  # Mask Adapter模型初始化
98
  if mask_adapter is None:
99
+ mask_adapter = build_mask_adapter(cfg, "MASKAdapterHead").cpu()
100
  # 加载Adapter状态字典
101
  adapter_state_dict = torch.load(adapter_pth, map_location=torch.device('cpu'))
102
  mask_adapter.load_state_dict(adapter_state_dict)