Update controlnet_module.py
Browse files- controlnet_module.py +9 -1
controlnet_module.py
CHANGED
|
@@ -620,6 +620,11 @@ class ControlNetProcessor:
|
|
| 620 |
|
| 621 |
elif mode == "focus_change":
|
| 622 |
print("🎯 FOCUS-CHANGE POSTPROCESSING")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 623 |
|
| 624 |
# Für focus_change: Originalbildgröße beibehalten
|
| 625 |
if image.size != original_image.size:
|
|
@@ -740,7 +745,10 @@ class ControlNetProcessor:
|
|
| 740 |
if mode == "face_only_change" and crop_size is not None:
|
| 741 |
print(f"👤 Bei face_only_change: Crop={crop_size}×{crop_size}px, Heuristik-Score={best_score:.3f}")
|
| 742 |
print(f"👤 Kopfabdeckung: {coverage_ratio:.1%} der BBox")
|
| 743 |
-
|
|
|
|
|
|
|
|
|
|
| 744 |
print("#" * 80)
|
| 745 |
return mask, raw_mask
|
| 746 |
|
|
|
|
| 620 |
|
| 621 |
elif mode == "focus_change":
|
| 622 |
print("🎯 FOCUS-CHANGE POSTPROCESSING")
|
| 623 |
+
|
| 624 |
+
elif mode == "focus_change":
|
| 625 |
+
print("🎯 FOCUS-CHANGE POSTPROCESSING")
|
| 626 |
+
# DEBUG: Zustand der Maske VOR der Bearbeitung
|
| 627 |
+
print(f" DEBUG VORHER - Min/Max: {mask_array.min()}/{mask_array.max()}, Typ: {mask_array.dtype}")
|
| 628 |
|
| 629 |
# Für focus_change: Originalbildgröße beibehalten
|
| 630 |
if image.size != original_image.size:
|
|
|
|
| 745 |
if mode == "face_only_change" and crop_size is not None:
|
| 746 |
print(f"👤 Bei face_only_change: Crop={crop_size}×{crop_size}px, Heuristik-Score={best_score:.3f}")
|
| 747 |
print(f"👤 Kopfabdeckung: {coverage_ratio:.1%} der BBox")
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
# Vor der Zeile: print("#" * 80) oder return mask, raw_mask
|
| 751 |
+
print(f" DEBUG NACHHER - Min/Max: {mask_array.min()}/{mask_array.max()}, Typ: {mask_array.dtype}")
|
| 752 |
print("#" * 80)
|
| 753 |
return mask, raw_mask
|
| 754 |
|