Astridkraft commited on
Commit
3b7d5ac
·
verified ·
1 Parent(s): e260ed2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1170,15 +1170,15 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1170
 
1171
 
1172
  # 1. Basierend auf der UI-Stärke (strength) berechnen
1173
- adj_strength = 0.15 + 0.8 * (ui_strength**2.0)
1174
- controlnet_strength = 0.9 * (1 - ui_strength**2.5)
1175
  pose_ratio = 0.85 - 0.4 * smoothstep(0.4, 0.8, ui_strength)
1176
  canny_ratio = 1.0 - pose_ratio
1177
 
1178
 
1179
  # 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
1180
- adj_strength = max(0.15, min(adj_strength, 0.92))
1181
- controlnet_strength = max(0.12, min(controlnet_strength, 0.85))
1182
  pose_ratio = max(0.4, min(pose_ratio, 0.85))
1183
  canny_ratio = max(0.15, min(canny_ratio, 0.6))
1184
 
 
1170
 
1171
 
1172
  # 1. Basierend auf der UI-Stärke (strength) berechnen
1173
+ adj_strength = 0.15 + 0.8 * ui_strength
1174
+ controlnet_strength = 0.85 - 0.83 * ui_strength
1175
  pose_ratio = 0.85 - 0.4 * smoothstep(0.4, 0.8, ui_strength)
1176
  canny_ratio = 1.0 - pose_ratio
1177
 
1178
 
1179
  # 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
1180
+ adj_strength = max(0.15, min(adj_strength, 0.95))
1181
+ controlnet_strength = max(0.08, min(controlnet_strength, 0.85))
1182
  pose_ratio = max(0.4, min(pose_ratio, 0.85))
1183
  canny_ratio = max(0.15, min(canny_ratio, 0.6))
1184