primerz commited on
Commit
c6ad10b
·
verified ·
1 Parent(s): 11f9790

Update generator.py

Browse files
Files changed (1) hide show
  1. generator.py +2 -8
generator.py CHANGED
@@ -169,14 +169,8 @@ class RetroArtConverter:
169
 
170
  print(f"[DEPTH] Grayscale depth map generated: {image.size}")
171
  return depth_image
172
-
173
- except Exception as e:
174
- print(f"[DEPTH] LeresDetector failed ({e}), falling back to grayscale depth")
175
- gray = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2GRAY)
176
- depth_colored = cv2.cvtColor(gray, cv2.COLOR_GRAY2RGB)
177
- return Image.fromarray(depth_colored)
178
- else:
179
- # Fallback to simple grayscale
180
  gray = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2GRAY)
181
  depth_colored = cv2.cvtColor(gray, cv2.COLOR_GRAY2RGB)
182
  return Image.fromarray(depth_colored)
 
169
 
170
  print(f"[DEPTH] Grayscale depth map generated: {image.size}")
171
  return depth_image
172
+ except Exception as e:
173
+ print(f"[DEPTH] Depth generation failed ({e}), using basic grayscale")
 
 
 
 
 
 
174
  gray = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2GRAY)
175
  depth_colored = cv2.cvtColor(gray, cv2.COLOR_GRAY2RGB)
176
  return Image.fromarray(depth_colored)