Update controlnet_module.py
Browse files- controlnet_module.py +5 -3
controlnet_module.py
CHANGED
|
@@ -592,13 +592,15 @@ class ControlNetProcessor:
|
|
| 592 |
kernel_close = np.ones((5, 5), np.uint8)
|
| 593 |
mask_array = cv2.morphologyEx(mask_array, cv2.MORPH_CLOSE, kernel_close, iterations=2)
|
| 594 |
|
| 595 |
-
#Sicherung der Binärmaske für Inpaint ohne Graupixel
|
| 596 |
-
inpaint_binary_mask = mask_array.copy()
|
| 597 |
-
print(f"🔳 [FOCUS] Inpainting-Maske gespeichert: {np.unique(inpaint_binary_mask)}")
|
| 598 |
|
| 599 |
#Dilate erweitert die Person um 7 weiße Pixel
|
| 600 |
kernel_dilate = np.ones((15, 15), np.uint8)
|
| 601 |
mask_array = cv2.dilate(mask_array, kernel_dilate, iterations=1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 602 |
|
| 603 |
|
| 604 |
# 3. Weiche Übergänge mittlerer Blur für natürliche Übergänge
|
|
|
|
| 592 |
kernel_close = np.ones((5, 5), np.uint8)
|
| 593 |
mask_array = cv2.morphologyEx(mask_array, cv2.MORPH_CLOSE, kernel_close, iterations=2)
|
| 594 |
|
|
|
|
|
|
|
|
|
|
| 595 |
|
| 596 |
#Dilate erweitert die Person um 7 weiße Pixel
|
| 597 |
kernel_dilate = np.ones((15, 15), np.uint8)
|
| 598 |
mask_array = cv2.dilate(mask_array, kernel_dilate, iterations=1)
|
| 599 |
+
|
| 600 |
+
|
| 601 |
+
#Sicherung der Binärmaske für Inpaint ohne Graupixel aber am 7 weiße Pixel erweitert
|
| 602 |
+
inpaint_binary_mask = mask_array.copy()
|
| 603 |
+
print(f"🔳 [FOCUS] Inpainting-Maske gespeichert: {np.unique(inpaint_binary_mask)}")
|
| 604 |
|
| 605 |
|
| 606 |
# 3. Weiche Übergänge mittlerer Blur für natürliche Übergänge
|