Astridkraft commited on
Commit
c942951
·
verified ·
1 Parent(s): bb5bc6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -1134,14 +1134,14 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1134
  print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
1135
 
1136
 
1137
- else: # face_only_change
1138
  keep_environment = True
1139
- adj_strength = min(0.85, strength * 1.25)
1140
- controlnet_strength = adj_strength * 0.5
1141
 
1142
  # HIER FEHLEN DIE RATIOS - Controlnet gesteuertes Inpainting:
1143
- depth_ratio = 0.7 # Für Gesicht: Depth stärker
1144
- canny_ratio = 0.3 # Canny leichter
1145
 
1146
  # KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
1147
  conditioning_scale = [
@@ -1150,6 +1150,9 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
1150
  ]
1151
 
1152
  print(f"👤 Gesichtsmodus: Depth {depth_ratio*100}%, Canny {canny_ratio*100}%")
 
 
 
1153
 
1154
 
1155
  # ===== WICHTIG: VARIABLEN FÜR KOMPLETTEN WORKFLOW =====
 
1134
  print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
1135
 
1136
 
1137
+ else: # face_only_change
1138
  keep_environment = True
1139
+ adj_strength = min(0.65, strength * 1.05)
1140
+ controlnet_strength = adj_strength * 0.45
1141
 
1142
  # HIER FEHLEN DIE RATIOS - Controlnet gesteuertes Inpainting:
1143
+ depth_ratio = 0.55 # Für Gesicht: Depth stärker
1144
+ canny_ratio = 0.45 # Canny leichter
1145
 
1146
  # KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
1147
  conditioning_scale = [
 
1150
  ]
1151
 
1152
  print(f"👤 Gesichtsmodus: Depth {depth_ratio*100}%, Canny {canny_ratio*100}%")
1153
+ print(f" Strength: {adj_strength:.2f}")
1154
+ print(f" ControlNet: {controlnet_strength:.3f}")
1155
+ print(f" Depth: {depth_ratio*100}%, Canny: {canny_ratio*100}%")
1156
 
1157
 
1158
  # ===== WICHTIG: VARIABLEN FÜR KOMPLETTEN WORKFLOW =====