xinjie.wang commited on
Commit
cbd4574
·
1 Parent(s): 8cc1ccb
asset3d_gen/validators/aesthetic_predictor.py CHANGED
@@ -18,11 +18,9 @@ class AestheticPredictor:
18
  device (str): Device to use for computation ("cuda" or "cpu").
19
  """
20
 
21
- def __init__(self, clip_model_dir=None, sac_model_path=None, device=None):
22
 
23
- self.device = device or (
24
- "cuda" if torch.cuda.is_available() else "cpu"
25
- )
26
 
27
  if clip_model_dir is None:
28
  model_path = snapshot_download(
@@ -91,7 +89,6 @@ class AestheticPredictor:
91
  model.eval()
92
  return model
93
 
94
- @spaces.GPU
95
  def predict(self, image_path):
96
  """Predict the aesthetic score for a given image.
97
 
 
18
  device (str): Device to use for computation ("cuda" or "cpu").
19
  """
20
 
21
+ def __init__(self, clip_model_dir=None, sac_model_path=None, device="cpu"):
22
 
23
+ self.device = device
 
 
24
 
25
  if clip_model_dir is None:
26
  model_path = snapshot_download(
 
89
  model.eval()
90
  return model
91
 
 
92
  def predict(self, image_path):
93
  """Predict the aesthetic score for a given image.
94