Update app.py
Browse files
app.py
CHANGED
|
@@ -1447,13 +1447,13 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1447 |
if any(keyword in prompt_lower for keyword in anime_keywords):
|
| 1448 |
print("🎨 ANIME-TRANSFORM-MODUS")
|
| 1449 |
|
| 1450 |
-
|
| 1451 |
-
|
| 1452 |
-
|
| 1453 |
|
| 1454 |
-
|
| 1455 |
-
|
| 1456 |
-
|
| 1457 |
|
| 1458 |
controlnet_strength = 0.30 + 0.52 * smoothstep(0.65, 0.9, ui_strength)
|
| 1459 |
controlnet_strength = max(0.25, min(controlnet_strength, 0.85))
|
|
|
|
| 1447 |
if any(keyword in prompt_lower for keyword in anime_keywords):
|
| 1448 |
print("🎨 ANIME-TRANSFORM-MODUS")
|
| 1449 |
|
| 1450 |
+
def smoothstep(min_val, max_val, x):
|
| 1451 |
+
x = max(0, min(1, (x - min_val) / (max_val - min_val)))
|
| 1452 |
+
return x * x * (3 - 2 * x)
|
| 1453 |
|
| 1454 |
+
# Basiseinstellungen für Anime
|
| 1455 |
+
adj_strength = 0.30 + 0.55 * smoothstep(0.35, 0.9, ui_strength)
|
| 1456 |
+
adj_strength = max(0.3, min(adj_strength, 0.85))
|
| 1457 |
|
| 1458 |
controlnet_strength = 0.30 + 0.52 * smoothstep(0.65, 0.9, ui_strength)
|
| 1459 |
controlnet_strength = max(0.25, min(controlnet_strength, 0.85))
|