Update app.py
Browse files
app.py
CHANGED
|
@@ -1421,22 +1421,20 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1421 |
|
| 1422 |
if any(keyword in prompt_lower for keyword in anime_keywords):
|
| 1423 |
# Anime: Mehr Denoising für Stiländerungen
|
| 1424 |
-
adj_strength = 0.
|
| 1425 |
|
| 1426 |
# Anime: Weniger ControlNet insgesamt
|
| 1427 |
-
controlnet_strength = 0.
|
| 1428 |
|
| 1429 |
# Anime: Weniger Depth, mehr Canny
|
| 1430 |
-
depth_ratio = 0.
|
| 1431 |
-
canny_ratio = 0.
|
| 1432 |
-
|
| 1433 |
-
|
| 1434 |
|
| 1435 |
#Clipping
|
| 1436 |
-
adj_strength = max(0.
|
| 1437 |
-
controlnet_strength = max(0.
|
| 1438 |
-
depth_ratio = max(0.
|
| 1439 |
-
canny_ratio = max(0.
|
| 1440 |
|
| 1441 |
|
| 1442 |
# KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
|
|
|
|
| 1421 |
|
| 1422 |
if any(keyword in prompt_lower for keyword in anime_keywords):
|
| 1423 |
# Anime: Mehr Denoising für Stiländerungen
|
| 1424 |
+
adj_strength = 0.55 + (ui_strength * 0.3) # 0.2-1.0
|
| 1425 |
|
| 1426 |
# Anime: Weniger ControlNet insgesamt
|
| 1427 |
+
controlnet_strength = 0.65 - (ui_strength * 0.3) # 0.7 → 0.2
|
| 1428 |
|
| 1429 |
# Anime: Weniger Depth, mehr Canny
|
| 1430 |
+
depth_ratio = 0.7 - (ui_strength * 0.2) # 0.6 → 0.3
|
| 1431 |
+
canny_ratio = 0.1 + (ui_strength * 0.1) # 0.4 → 0.8
|
|
|
|
|
|
|
| 1432 |
|
| 1433 |
#Clipping
|
| 1434 |
+
adj_strength = max(0.3, min(adj_strength, 0.85))
|
| 1435 |
+
controlnet_strength = max(0.2, min(controlnet_strength, 0.7))
|
| 1436 |
+
depth_ratio = max(0.4, min(depth_ratio, 0.8))
|
| 1437 |
+
canny_ratio = max(0.05, min(canny_ratio, 0.3))
|
| 1438 |
|
| 1439 |
|
| 1440 |
# KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
|