Update app.py
Browse files
app.py
CHANGED
|
@@ -1159,16 +1159,16 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1159 |
ui_strength = strength # Benenne um für Klarheit
|
| 1160 |
|
| 1161 |
# 1. Basierend auf der UI-Stärke (strength) berechnen
|
| 1162 |
-
adj_strength = ui_strength * 0.
|
| 1163 |
-
controlnet_strength = 0.
|
| 1164 |
pose_ratio = 0.75 - (ui_strength * 0.15)
|
| 1165 |
canny_ratio = 0.25 + (ui_strength * 0.15)
|
| 1166 |
|
| 1167 |
# 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
|
| 1168 |
-
adj_strength = max(0.
|
| 1169 |
-
controlnet_strength = max(0.
|
| 1170 |
-
pose_ratio = max(0.
|
| 1171 |
-
canny_ratio = max(0.2, min(canny_ratio, 0.
|
| 1172 |
|
| 1173 |
|
| 1174 |
print(f"👤 Humanoid → Humanoid (UI-Stärke: {ui_strength})")
|
|
|
|
| 1159 |
ui_strength = strength # Benenne um für Klarheit
|
| 1160 |
|
| 1161 |
# 1. Basierend auf der UI-Stärke (strength) berechnen
|
| 1162 |
+
adj_strength = ui_strength * 0.8
|
| 1163 |
+
controlnet_strength = 0.5 - (ui_strength * 0.35)
|
| 1164 |
pose_ratio = 0.75 - (ui_strength * 0.15)
|
| 1165 |
canny_ratio = 0.25 + (ui_strength * 0.15)
|
| 1166 |
|
| 1167 |
# 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
|
| 1168 |
+
adj_strength = max(0.1, min(adj_strength, 0.8))
|
| 1169 |
+
controlnet_strength = max(0.15, min(controlnet_strength, 0.5))
|
| 1170 |
+
pose_ratio = max(0.5, min(pose_ratio, 0.8))
|
| 1171 |
+
canny_ratio = max(0.2, min(canny_ratio, 0.5))
|
| 1172 |
|
| 1173 |
|
| 1174 |
print(f"👤 Humanoid → Humanoid (UI-Stärke: {ui_strength})")
|