Astridkraft commited on
Commit
f7433c8
·
verified ·
1 Parent(s): 17727b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -1159,16 +1159,16 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1159
  ui_strength = strength # Benenne um für Klarheit
1160
 
1161
  # 1. Basierend auf der UI-Stärke (strength) berechnen
1162
- adj_strength = ui_strength * 0.7
1163
- controlnet_strength = 1.0 - (ui_strength * 0.3)
1164
- pose_ratio = 0.85 - (ui_strength * 0.2)
1165
- canny_ratio = 0.15 + (ui_strength * 0.2)
1166
 
1167
  # 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
1168
- adj_strength = max(0.3, min(adj_strength, 0.8))
1169
- controlnet_strength = max(0.4, min(controlnet_strength, 0.95))
1170
- pose_ratio = max(0.5, min(pose_ratio, 0.9))
1171
- canny_ratio = max(0.1, min(canny_ratio, 0.5))
1172
 
1173
 
1174
  print(f"👤 Humanoid → Humanoid (UI-Stärke: {ui_strength})")
 
1159
  ui_strength = strength # Benenne um für Klarheit
1160
 
1161
  # 1. Basierend auf der UI-Stärke (strength) berechnen
1162
+ adj_strength = ui_strength * 0.85
1163
+ controlnet_strength = 0.65 - (ui_strength * 0.25)
1164
+ pose_ratio = 0.75 - (ui_strength * 0.15)
1165
+ canny_ratio = 0.25 + (ui_strength * 0.15)
1166
 
1167
  # 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
1168
+ adj_strength = max(0.55, min(adj_strength, 0.75))
1169
+ controlnet_strength = max(0.3, min(controlnet_strength, 0.55))
1170
+ pose_ratio = max(0.6, min(pose_ratio, 0.8))
1171
+ canny_ratio = max(0.2, min(canny_ratio, 0.4))
1172
 
1173
 
1174
  print(f"👤 Humanoid → Humanoid (UI-Stärke: {ui_strength})")