Astridkraft commited on
Commit
7042cd9
·
verified ·
1 Parent(s): 26bdf85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -24
app.py CHANGED
@@ -1499,30 +1499,7 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1499
 
1500
 
1501
 
1502
- if any(keyword in prompt_lower for keyword in anime_keywords):
1503
- print("🎨 ANIME-TRANSFORM-MODUS")
1504
-
1505
- def smoothstep(min_val, max_val, x):
1506
- x = max(0, min(1, (x - min_val) / (max_val - min_val)))
1507
- return x * x * (3 - 2 * x)
1508
-
1509
- # 1️⃣ Transformationsdruck (radikal erst spät)
1510
- adj_strength = 0.30 + 0.55 * smoothstep(0.35, 0.9, ui_strength)
1511
- adj_strength = max(0.3, min(adj_strength, 0.85))
1512
-
1513
- # 2️⃣ ControlNet: lange frei, dann stabilisieren
1514
- controlnet_strength = 0.30 + 0.52 * smoothstep(0.65, 0.9, ui_strength)
1515
- controlnet_strength = max(0.25, min(controlnet_strength, 0.85))
1516
-
1517
- # 3️⃣ Anime-Ratios (normiert!)
1518
- depth_ratio = 0.55 + 0.15 * smoothstep(0.5, 0.9, ui_strength)
1519
- canny_ratio = 1.0 - depth_ratio
1520
-
1521
- # 4️⃣ Conditioning
1522
- conditioning_scale = [
1523
- controlnet_strength * depth_ratio,
1524
- controlnet_strength * canny_ratio
1525
- ]
1526
 
1527
  print(f"UI Strength: {ui_strength}")
1528
  print(f"adj_strength: {adj_strength:.3f}")
 
1499
 
1500
 
1501
 
1502
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1503
 
1504
  print(f"UI Strength: {ui_strength}")
1505
  print(f"adj_strength: {adj_strength:.3f}")