Update controlnet_module.py
Browse files- controlnet_module.py +11 -4
controlnet_module.py
CHANGED
|
@@ -869,12 +869,19 @@ class ControlNetProcessor:
|
|
| 869 |
face_y = center_y - face_offset
|
| 870 |
face_y = max(y1 + 10, min(face_y, y2 - 10)) # In BBox halten
|
| 871 |
|
| 872 |
-
#
|
| 873 |
-
input_points = [[[[center_x, center_y]
|
| 874 |
-
input_labels = [[[1
|
| 875 |
|
| 876 |
print(f" 🎯 SAM-Prompt: BBox [{x1},{y1},{x2},{y2}]")
|
| 877 |
-
print(f" 👁️
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 878 |
|
| 879 |
# Aufruf des SAM-Prozessors mit den Variablen. Der Processor verpackt diese Rohdaten
|
| 880 |
# in die für das SAM-Modell erforderlichen Tensoren und speichert sie in inputs.
|
|
|
|
| 869 |
face_y = center_y - face_offset
|
| 870 |
face_y = max(y1 + 10, min(face_y, y2 - 10)) # In BBox halten
|
| 871 |
|
| 872 |
+
# NUR EIN Punkt: Der Gesichtspunkt in der Mitte der BBox
|
| 873 |
+
input_points = [[[[center_x, center_y]]]] # EIN Punkt
|
| 874 |
+
input_labels = [[[1]]] # Ein positiver Prompt
|
| 875 |
|
| 876 |
print(f" 🎯 SAM-Prompt: BBox [{x1},{y1},{x2},{y2}]")
|
| 877 |
+
print(f" 👁️ Punkt: Nur Gesicht ({face_x},{face_y})")
|
| 878 |
+
|
| 879 |
+
# BEIDE Punkte kombinieren
|
| 880 |
+
#input_points = [[[[center_x, center_y], [face_x, face_y]]]] # ZWEI Punkte
|
| 881 |
+
#input_labels = [[[1, 1]]] # Beide sind positive Prompts
|
| 882 |
+
|
| 883 |
+
#print(f" 🎯 SAM-Prompt: BBox [{x1},{y1},{x2},{y2}]")
|
| 884 |
+
#print(f" 👁️ Punkte: Mitte ({center_x},{center_y}), Gesicht ({face_x},{face_y})")
|
| 885 |
|
| 886 |
# Aufruf des SAM-Prozessors mit den Variablen. Der Processor verpackt diese Rohdaten
|
| 887 |
# in die für das SAM-Modell erforderlichen Tensoren und speichert sie in inputs.
|