Update app.py
Browse files
app.py
CHANGED
|
@@ -1471,21 +1471,22 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1471 |
adj_strength = 0.25 + 0.65 * t
|
| 1472 |
|
| 1473 |
# DEPTH/CANNY: Später Anstieg, starke Anime-Stilisierung
|
| 1474 |
-
if ui_strength <= 0.
|
| 1475 |
-
controlnet_strength = 0.
|
|
|
|
|
|
|
| 1476 |
else:
|
| 1477 |
-
|
| 1478 |
-
controlnet_strength = 0.45 - (t_cn * 0.35) # 20% → 5%
|
| 1479 |
|
| 1480 |
-
depth_ratio = 0.
|
| 1481 |
canny_ratio = 1.0 - depth_ratio
|
| 1482 |
|
| 1483 |
|
| 1484 |
#Clipping:
|
| 1485 |
adj_strength = max(0.25, min(adj_strength, 0.95)) # 25-95%
|
| 1486 |
-
controlnet_strength = max(0.
|
| 1487 |
-
depth_ratio = max(0.
|
| 1488 |
-
canny_ratio = max(0.05, min(canny_ratio, 0.
|
| 1489 |
|
| 1490 |
print(f" 👤 LATE-START GESICHT:")
|
| 1491 |
print(f" UI={ui_strength:.2f}, t={t:.3f}")
|
|
|
|
| 1471 |
adj_strength = 0.25 + 0.65 * t
|
| 1472 |
|
| 1473 |
# DEPTH/CANNY: Später Anstieg, starke Anime-Stilisierung
|
| 1474 |
+
if ui_strength <= 0.75:
|
| 1475 |
+
controlnet_strength = 0.50
|
| 1476 |
+
elif ui_strength <= 0.85:
|
| 1477 |
+
controlnet_strength = 0.40
|
| 1478 |
else:
|
| 1479 |
+
controlnet_strength = 0.30
|
|
|
|
| 1480 |
|
| 1481 |
+
depth_ratio = 0.90 - (ui_strength * 0.12)
|
| 1482 |
canny_ratio = 1.0 - depth_ratio
|
| 1483 |
|
| 1484 |
|
| 1485 |
#Clipping:
|
| 1486 |
adj_strength = max(0.25, min(adj_strength, 0.95)) # 25-95%
|
| 1487 |
+
controlnet_strength = max(0.30, min(controlnet_strength, 0.85)) # 15-85%
|
| 1488 |
+
depth_ratio = max(0.75, min(depth_ratio, 0.95)) # 50-95%
|
| 1489 |
+
canny_ratio = max(0.05, min(canny_ratio, 0.25)) # 5-40%
|
| 1490 |
|
| 1491 |
print(f" 👤 LATE-START GESICHT:")
|
| 1492 |
print(f" UI={ui_strength:.2f}, t={t:.3f}")
|