Astridkraft commited on
Commit
569f6e7
·
verified ·
1 Parent(s): 6f38c0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1190,8 +1190,8 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1190
  # Canny-Reduktion bei hoher Stärke für Farbfreiheit
1191
  if ui_strength > 0.6:
1192
  # Je höher die Stärke, desto weniger Canny (für Farbänderungen)
1193
- canny_reduction = smoothstep(0.6, 0.9, ui_strength) * 0.2
1194
- pose_ratio = min(0.65, base_pose + canny_reduction) # Pose erhöhen = Canny reduzieren
1195
  else:
1196
  pose_ratio = base_pose
1197
 
@@ -1210,8 +1210,8 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1210
  # 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
1211
  adj_strength = max(0.15, min(adj_strength, 0.95))
1212
  controlnet_strength = max(0.12, min(controlnet_strength, 0.85))
1213
- pose_ratio = max(0.45, min(pose_ratio, 0.65))
1214
- canny_ratio = max(0.35, min(canny_ratio, 0.55))
1215
 
1216
  conditioning_scale = [
1217
  controlnet_strength * pose_ratio, # Depth-Gewichtung
 
1190
  # Canny-Reduktion bei hoher Stärke für Farbfreiheit
1191
  if ui_strength > 0.6:
1192
  # Je höher die Stärke, desto weniger Canny (für Farbänderungen)
1193
+ canny_reduction = smoothstep(0.6, 0.9, ui_strength) * 0.15
1194
+ pose_ratio = min(0.60, base_pose + canny_reduction) # Pose erhöhen = Canny reduzieren
1195
  else:
1196
  pose_ratio = base_pose
1197
 
 
1210
  # 2. Werte auf sinnvolle Bereiche begrenzen (Clipping)
1211
  adj_strength = max(0.15, min(adj_strength, 0.95))
1212
  controlnet_strength = max(0.12, min(controlnet_strength, 0.85))
1213
+ pose_ratio = max(0.45, min(pose_ratio, 0.60))
1214
+ canny_ratio = max(0.40, min(canny_ratio, 0.55))
1215
 
1216
  conditioning_scale = [
1217
  controlnet_strength * pose_ratio, # Depth-Gewichtung