huzey commited on
Commit
69d2985
1 Parent(s): fda4350

update gpu

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -155,6 +155,7 @@ def image_mobilesam_feature(
155
  if USE_CUDA:
156
  images = images.cuda()
157
 
 
158
  feat_extractor = mobilesam
159
  if USE_CUDA:
160
  feat_extractor = feat_extractor.cuda()
@@ -258,6 +259,7 @@ def image_sam_feature(
258
  if USE_CUDA:
259
  images = images.cuda()
260
 
 
261
  feat_extractor = sam
262
  if USE_CUDA:
263
  feat_extractor = feat_extractor.cuda()
@@ -335,6 +337,7 @@ def image_dino_feature(images, node_type="block", layer=-1):
335
  if USE_CUDA:
336
  images = images.cuda()
337
 
 
338
  feat_extractor = dinov2
339
  if USE_CUDA:
340
  feat_extractor = feat_extractor.cuda()
@@ -434,6 +437,7 @@ def image_clip_feature(
434
  if USE_CUDA:
435
  images = images.cuda()
436
 
 
437
  feat_extractor = clip
438
  if USE_CUDA:
439
  feat_extractor = feat_extractor.cuda()
 
155
  if USE_CUDA:
156
  images = images.cuda()
157
 
158
+ global mobilesam
159
  feat_extractor = mobilesam
160
  if USE_CUDA:
161
  feat_extractor = feat_extractor.cuda()
 
259
  if USE_CUDA:
260
  images = images.cuda()
261
 
262
+ global sam
263
  feat_extractor = sam
264
  if USE_CUDA:
265
  feat_extractor = feat_extractor.cuda()
 
337
  if USE_CUDA:
338
  images = images.cuda()
339
 
340
+ global dinov2
341
  feat_extractor = dinov2
342
  if USE_CUDA:
343
  feat_extractor = feat_extractor.cuda()
 
437
  if USE_CUDA:
438
  images = images.cuda()
439
 
440
+ global clip
441
  feat_extractor = clip
442
  if USE_CUDA:
443
  feat_extractor = feat_extractor.cuda()