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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
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.7:
1475
- controlnet_strength = 0.45
 
 
1476
  else:
1477
- t_cn = (ui_strength - 0.7) / 0.2
1478
- controlnet_strength = 0.45 - (t_cn * 0.35) # 20% → 5%
1479
 
1480
- depth_ratio = 0.85 - (ui_strength * 0.15)
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.15, min(controlnet_strength, 0.85)) # 15-85%
1487
- depth_ratio = max(0.5, min(depth_ratio, 0.95)) # 50-95%
1488
- canny_ratio = max(0.05, min(canny_ratio, 0.40)) # 5-40%
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}")