Update app.py
Browse files
app.py
CHANGED
|
@@ -1083,51 +1083,34 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1083 |
|
| 1084 |
# NUR für frontale Gesichter Gesichts-Booster hinzufügen
|
| 1085 |
if is_front_face and not is_back_head:
|
| 1086 |
-
|
| 1087 |
|
| 1088 |
-
|
| 1089 |
-
|
| 1090 |
-
|
| 1091 |
-
|
| 1092 |
-
|
| 1093 |
-
|
| 1094 |
-
|
| 1095 |
else:
|
| 1096 |
# Keine Gesichts-Booster für Hinterkopf oder unklare Fälle
|
| 1097 |
enhanced_prompt = prompt
|
| 1098 |
|
| 1099 |
-
|
| 1100 |
-
|
| 1101 |
-
|
| 1102 |
-
|
| 1103 |
-
|
| 1104 |
-
|
| 1105 |
-
|
| 1106 |
-
|
| 1107 |
-
|
| 1108 |
-
|
| 1109 |
-
|
| 1110 |
-
|
| 1111 |
-
|
| 1112 |
-
|
| 1113 |
-
|
| 1114 |
-
|
| 1115 |
-
|
| 1116 |
-
|
| 1117 |
-
|
| 1118 |
-
|
| 1119 |
-
|
| 1120 |
|
| 1121 |
|
| 1122 |
-
face_boosters = "(perfect face:1.2), (symmetrical face:1.1), realistic shaded perfect face, "
|
| 1123 |
|
| 1124 |
-
if not any(keyword in prompt.lower() for keyword in
|
| 1125 |
-
|
| 1126 |
-
|
| 1127 |
-
|
| 1128 |
-
else:
|
| 1129 |
-
|
| 1130 |
-
|
| 1131 |
|
| 1132 |
elif mode == "focus_change":
|
| 1133 |
focus_boosters = "(sharp focus:1.2), (detailed subject:1.1), (clear foreground:1.1), "
|
|
|
|
| 1083 |
|
| 1084 |
# NUR für frontale Gesichter Gesichts-Booster hinzufügen
|
| 1085 |
if is_front_face and not is_back_head:
|
| 1086 |
+
face_boosters = "(perfect face:1.2), (symmetrical face:1.1), realistic shaded perfect face, "
|
| 1087 |
|
| 1088 |
+
if not any(keyword in prompt_lower for keyword in
|
| 1089 |
+
["perfect face", "symmetrical", "realistic face", "shaded face"]):
|
| 1090 |
+
enhanced_prompt = face_boosters + prompt
|
| 1091 |
+
print(f"👤 Gesichts-Booster hinzugefügt: {face_boosters}")
|
| 1092 |
+
else:
|
| 1093 |
+
enhanced_prompt = prompt
|
| 1094 |
+
print(f"👤 Benutzer hat bereits Gesichts-Booster im Prompt")
|
| 1095 |
else:
|
| 1096 |
# Keine Gesichts-Booster für Hinterkopf oder unklare Fälle
|
| 1097 |
enhanced_prompt = prompt
|
| 1098 |
|
| 1099 |
+
if is_back_head:
|
| 1100 |
+
print(f"💇 Hinterkopf erkannt → Keine Gesichts-Booster")
|
| 1101 |
+
else:
|
| 1102 |
+
print(f"👤 Keine Gesichts-Booster (unspezifischer Prompt)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1103 |
|
| 1104 |
|
| 1105 |
+
#face_boosters = "(perfect face:1.2), (symmetrical face:1.1), realistic shaded perfect face, "
|
| 1106 |
|
| 1107 |
+
#if not any(keyword in prompt.lower() for keyword in
|
| 1108 |
+
# ["perfect face", "symmetrical", "realistic face", "shaded face"]):
|
| 1109 |
+
# enhanced_prompt = face_boosters + prompt
|
| 1110 |
+
# print(f"👤 Gesichts-Booster hinzugefügt: {face_boosters}")
|
| 1111 |
+
#else:
|
| 1112 |
+
# enhanced_prompt = prompt
|
| 1113 |
+
# print(f"👤 Benutzer hat bereits Gesichts-Booster im Prompt")
|
| 1114 |
|
| 1115 |
elif mode == "focus_change":
|
| 1116 |
focus_boosters = "(sharp focus:1.2), (detailed subject:1.1), (clear foreground:1.1), "
|