Astridkraft commited on
Commit
3e51403
·
verified ·
1 Parent(s): 7d470b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -1468,25 +1468,25 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1468
  # ===== ANIME-GESICHT VORNE (SPÄTER START) =====
1469
  t = smoothstep_late(0.4, 0.9, ui_strength)
1470
 
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}")
 
1468
  # ===== ANIME-GESICHT VORNE (SPÄTER START) =====
1469
  t = smoothstep_late(0.4, 0.9, ui_strength)
1470
 
1471
+ adj_strength = 0.30 + 0.60 * t
1472
 
1473
  # DEPTH/CANNY: Später Anstieg, starke Anime-Stilisierung
1474
  if ui_strength <= 0.75:
1475
+ controlnet_strength = 0.45
1476
  elif ui_strength <= 0.85:
 
 
1477
  controlnet_strength = 0.30
1478
+ else:
1479
+ controlnet_strength = 0.25
1480
 
1481
+ depth_ratio = 0.80 - (ui_strength * 0.15)
1482
  canny_ratio = 1.0 - depth_ratio
1483
 
1484
 
1485
  #Clipping:
1486
+ adj_strength = max(0.30, 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.65, min(depth_ratio, 0.90)) # 50-95%
1489
+ canny_ratio = max(0.10, min(canny_ratio, 0.35)) # 5-40%
1490
 
1491
  print(f" 👤 LATE-START GESICHT:")
1492
  print(f" UI={ui_strength:.2f}, t={t:.3f}")