Astridkraft commited on
Commit
9578715
·
verified ·
1 Parent(s): f5de775

Update controlnet_module.py

Browse files
Files changed (1) hide show
  1. controlnet_module.py +2 -7
controlnet_module.py CHANGED
@@ -559,13 +559,8 @@ class ControlNetProcessor:
559
  print(" ⚠️ Maske leer, erstelle rechteckige Fallback-Maske")
560
  mask_array = np.zeros((image.height, image.width), dtype=np.uint8)
561
  # BBox auf 512x512 skalieren für Fallback
562
- scale_x = 512 / image.width
563
- scale_y = 512 / image.height
564
- fb_x1 = int(x1 * scale_x)
565
- fb_y1 = int(y1 * scale_y)
566
- fb_x2 = int(x2 * scale_x)
567
- fb_y2 = int(y2 * scale_y)
568
- cv2.rectangle(mask_array, (fb_x1, fb_y1), (fb_x2, fb_y2), 255, -1) #weiße Rechteckbox
569
 
570
  # Damit wird die Rohmaske für die UI-Anzeige gespeichert
571
  raw_mask_array = mask_array.copy()
 
559
  print(" ⚠️ Maske leer, erstelle rechteckige Fallback-Maske")
560
  mask_array = np.zeros((image.height, image.width), dtype=np.uint8)
561
  # BBox auf 512x512 skalieren für Fallback
562
+ cv2.rectangle(mask_array, (x1, y1), (x2, y2), 255, -1) #weiße Box
563
+
 
 
 
 
 
564
 
565
  # Damit wird die Rohmaske für die UI-Anzeige gespeichert
566
  raw_mask_array = mask_array.copy()