nick_93 commited on
Commit
ab3659a
1 Parent(s): 59ee13b
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -112,9 +112,9 @@ def segment_image(
112
 
113
  def get_depth_pipeline():
114
  feature_extractor = AutoImageProcessor.from_pretrained("LiheYoung/depth-anything-large-hf",
115
- torch_dtype=dtype)
116
  depth_estimator = AutoModelForDepthEstimation.from_pretrained("LiheYoung/depth-anything-large-hf",
117
- torch_dtype=dtype)
118
  return feature_extractor, depth_estimator
119
 
120
 
@@ -209,8 +209,7 @@ class ControlNetDepthDesignModelMulti:
209
 
210
  self.seg_image_processor, self.image_segmentor = get_segmentation_pipeline()
211
  self.depth_feature_extractor, self.depth_estimator = get_depth_pipeline()
212
- self.depth_estimator = self.depth_estimator.to(device)
213
-
214
  @spaces.GPU
215
  def generate_design(self, empty_room_image: Image, prompt: str, guidance_scale: int = 10, num_steps: int = 50, strength: float =0.9, img_size: int = 640) -> Image:
216
  """
 
112
 
113
  def get_depth_pipeline():
114
  feature_extractor = AutoImageProcessor.from_pretrained("LiheYoung/depth-anything-large-hf",
115
+ torch_dtype=dtype).to(device)
116
  depth_estimator = AutoModelForDepthEstimation.from_pretrained("LiheYoung/depth-anything-large-hf",
117
+ torch_dtype=dtype).to(device)
118
  return feature_extractor, depth_estimator
119
 
120
 
 
209
 
210
  self.seg_image_processor, self.image_segmentor = get_segmentation_pipeline()
211
  self.depth_feature_extractor, self.depth_estimator = get_depth_pipeline()
212
+
 
213
  @spaces.GPU
214
  def generate_design(self, empty_room_image: Image, prompt: str, guidance_scale: int = 10, num_steps: int = 50, strength: float =0.9, img_size: int = 640) -> Image:
215
  """