nick_93 commited on
Commit
02742e5
1 Parent(s): bff5c84
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -126,7 +126,7 @@ def get_depth_image(
126
  feature_extractor: AutoImageProcessor,
127
  depth_estimator: AutoModelForDepthEstimation
128
  ) -> Image:
129
- image_to_depth = feature_extractor(images=image, return_tensors="pt")#.to(device)
130
  with torch.no_grad():
131
  depth_map = depth_estimator(**image_to_depth).predicted_depth
132
 
@@ -178,6 +178,7 @@ def flush():
178
 
179
  class ControlNetDepthDesignModelMulti:
180
  """ Produces random noise images """
 
181
  def __init__(self):
182
  """ Initialize your model(s) here """
183
  #os.environ['HF_HUB_OFFLINE'] = "True"
 
126
  feature_extractor: AutoImageProcessor,
127
  depth_estimator: AutoModelForDepthEstimation
128
  ) -> Image:
129
+ image_to_depth = feature_extractor(images=image, return_tensors="pt").to(device)
130
  with torch.no_grad():
131
  depth_map = depth_estimator(**image_to_depth).predicted_depth
132
 
 
178
 
179
  class ControlNetDepthDesignModelMulti:
180
  """ Produces random noise images """
181
+ @spaces.GPU
182
  def __init__(self):
183
  """ Initialize your model(s) here """
184
  #os.environ['HF_HUB_OFFLINE'] = "True"