Astridkraft commited on
Commit
5efe802
·
verified ·
1 Parent(s): 6da3d2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -10
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.2 + (ui_strength * 0.8) # 0.2-1.0
1425
 
1426
  # Anime: Weniger ControlNet insgesamt
1427
- controlnet_strength = 0.7 - (ui_strength * 0.5) # 0.7 → 0.2
1428
 
1429
  # Anime: Weniger Depth, mehr Canny
1430
- depth_ratio = 0.6 - (ui_strength * 0.3) # 0.6 → 0.3
1431
- canny_ratio = 0.4 + (ui_strength * 0.4) # 0.4 → 0.8
1432
-
1433
-
1434
 
1435
  #Clipping
1436
- adj_strength = max(0.15, min(adj_strength, 0.95))
1437
- controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
1438
- depth_ratio = max(0.1, min(depth_ratio, 0.9))
1439
- canny_ratio = max(0.1, min(canny_ratio, 0.9))
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)!