Update app.py
Browse files
app.py
CHANGED
|
@@ -1194,16 +1194,7 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1194 |
pose_ratio = min(0.60, base_pose + canny_reduction) # Pose erhöhen = Canny reduzieren
|
| 1195 |
else:
|
| 1196 |
pose_ratio = base_pose
|
| 1197 |
-
|
| 1198 |
-
|
| 1199 |
-
# Pose-Boost bei hoher UI-Stärke (verhindert kleine/verdrehte Körper)
|
| 1200 |
-
#if ui_strength > 0.7:
|
| 1201 |
-
# pose_boost = (ui_strength - 0.7) * 0.5 # 0 → 0.1 bei UI=0.9
|
| 1202 |
-
# pose_ratio = base_pose_ratio + pose_boost
|
| 1203 |
-
#else:
|
| 1204 |
-
# pose_ratio = base_pose_ratio
|
| 1205 |
-
|
| 1206 |
-
|
| 1207 |
canny_ratio = 1.0 - pose_ratio
|
| 1208 |
|
| 1209 |
|
|
@@ -1380,19 +1371,7 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1380 |
print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
|
| 1381 |
|
| 1382 |
|
| 1383 |
-
else: # face_only_change
|
| 1384 |
-
# Optimale UI-Werte (entscheidend)
|
| 1385 |
-
# Strength: 0.60 – 0.65 → ideal: 0.62
|
| 1386 |
-
# Guidance (CFG): 7.0 – 8.0 → ideal: 7.5
|
| 1387 |
-
# Steps: 30 – 34 → ideal: 32
|
| 1388 |
-
|
| 1389 |
-
#alte Werte mit UI-strength 0,85
|
| 1390 |
-
#adj_strength = 0.6 #Struktur
|
| 1391 |
-
#controlnet_strength = 0.4
|
| 1392 |
-
# HIER FEHLEN DIE RATIOS - Controlnet gesteuertes Inpainting:
|
| 1393 |
-
#depth_ratio = 0.55 # Für Gesicht: Depth stärker
|
| 1394 |
-
#canny_ratio = 0.10 # Canny leichter hält an Kanten fest
|
| 1395 |
-
|
| 1396 |
keep_environment = True
|
| 1397 |
|
| 1398 |
ui_strength = strength # 0.1-0.9 vom User
|
|
|
|
| 1194 |
pose_ratio = min(0.60, base_pose + canny_reduction) # Pose erhöhen = Canny reduzieren
|
| 1195 |
else:
|
| 1196 |
pose_ratio = base_pose
|
| 1197 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1198 |
canny_ratio = 1.0 - pose_ratio
|
| 1199 |
|
| 1200 |
|
|
|
|
| 1371 |
print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
|
| 1372 |
|
| 1373 |
|
| 1374 |
+
else: # face_only_change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1375 |
keep_environment = True
|
| 1376 |
|
| 1377 |
ui_strength = strength # 0.1-0.9 vom User
|