Update app.py
Browse files
app.py
CHANGED
|
@@ -1170,15 +1170,15 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1170 |
|
| 1171 |
|
| 1172 |
# 1. Basierend auf der UI-Stärke (strength) berechnen
|
| 1173 |
-
adj_strength = 0.15 + 0.8 *
|
| 1174 |
-
controlnet_strength = 0.
|
| 1175 |
pose_ratio = 0.85 - 0.4 * smoothstep(0.4, 0.8, ui_strength)
|
| 1176 |
canny_ratio = 1.0 - pose_ratio
|
| 1177 |
|
| 1178 |
|
| 1179 |
# 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
|
| 1180 |
-
adj_strength = max(0.15, min(adj_strength, 0.
|
| 1181 |
-
controlnet_strength = max(0.
|
| 1182 |
pose_ratio = max(0.4, min(pose_ratio, 0.85))
|
| 1183 |
canny_ratio = max(0.15, min(canny_ratio, 0.6))
|
| 1184 |
|
|
|
|
| 1170 |
|
| 1171 |
|
| 1172 |
# 1. Basierend auf der UI-Stärke (strength) berechnen
|
| 1173 |
+
adj_strength = 0.15 + 0.8 * ui_strength
|
| 1174 |
+
controlnet_strength = 0.85 - 0.83 * ui_strength
|
| 1175 |
pose_ratio = 0.85 - 0.4 * smoothstep(0.4, 0.8, ui_strength)
|
| 1176 |
canny_ratio = 1.0 - pose_ratio
|
| 1177 |
|
| 1178 |
|
| 1179 |
# 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
|
| 1180 |
+
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1181 |
+
controlnet_strength = max(0.08, min(controlnet_strength, 0.85))
|
| 1182 |
pose_ratio = max(0.4, min(pose_ratio, 0.85))
|
| 1183 |
canny_ratio = max(0.15, min(canny_ratio, 0.6))
|
| 1184 |
|