sand74 commited on
Commit
945fbe7
·
verified ·
1 Parent(s): dfd2da7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -53,13 +53,14 @@ def get_openpos_image(image):
53
 
54
 
55
  def get_depth_image(image):
56
- print("Image type", type(image))
 
57
  depth_estimator = pipeline('depth-estimation')
58
- image = depth_estimator(image)['depth']
59
- image = np.array(image)
60
- image = image[:, :, None]
61
- image = np.concatenate([image, image, image], axis=2)
62
- return PIL.Image.fromarray(image)
63
 
64
 
65
  control_net_modes = {
 
53
 
54
 
55
  def get_depth_image(image):
56
+ pil_image = PIL.Image.fromarray(image)
57
+ print("Image type", type(pil_image))
58
  depth_estimator = pipeline('depth-estimation')
59
+ pil_image = depth_estimator(pil_image)['depth']
60
+ pil_image = np.array(pil_image)
61
+ pil_image = image[:, :, None]
62
+ pil_image = np.concatenate([pil_image, pil_image, pil_image], axis=2)
63
+ return PIL.Image.fromarray(pil_image)
64
 
65
 
66
  control_net_modes = {