Update app.py
Browse files
app.py
CHANGED
|
@@ -1435,8 +1435,8 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1435 |
#Clipping
|
| 1436 |
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1437 |
controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
|
| 1438 |
-
depth_ratio = max(0.1, min(
|
| 1439 |
-
canny_ratio = max(0.1, min(
|
| 1440 |
|
| 1441 |
|
| 1442 |
# KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
|
|
@@ -1446,7 +1446,6 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1446 |
]
|
| 1447 |
|
| 1448 |
print(" 🎨 Anime-Modus: Mehr Freiheit für Stiländerungen")
|
| 1449 |
-
print(f"🎯 STANDARD MODUS: Umgebung ändern")
|
| 1450 |
print(f" Strength: {adj_strength}, ControlNet: {controlnet_strength}")
|
| 1451 |
print(f" Depth: {depth_ratio*100}%, Canny: {canny_ratio*100}%")
|
| 1452 |
print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
|
|
@@ -1462,14 +1461,14 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1462 |
controlnet_strength = min(0.9, controlnet_strength * 1.2) # Mehr Kontrolle
|
| 1463 |
|
| 1464 |
# Mehr Depth, weniger Canny
|
| 1465 |
-
depth_ratio = min(0.9,
|
| 1466 |
-
canny_ratio = max(0.1,
|
| 1467 |
|
| 1468 |
#Clipping
|
| 1469 |
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1470 |
controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
|
| 1471 |
-
|
| 1472 |
-
|
| 1473 |
|
| 1474 |
|
| 1475 |
conditioning_scale = [
|
|
@@ -1478,7 +1477,6 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1478 |
]
|
| 1479 |
|
| 1480 |
print(" 📸 Drawing-Modus: Mehr Strukturerhalt")
|
| 1481 |
-
print(f"🎯 STANDARD MODUS: Umgebung ändern")
|
| 1482 |
print(f" Strength: {adj_strength}, ControlNet: {controlnet_strength}")
|
| 1483 |
print(f" Depth: {depth_ratio*100}%, Canny: {canny_ratio*100}%")
|
| 1484 |
print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
|
|
@@ -1487,8 +1485,8 @@ def img_to_image(image, prompt, neg_prompt, strength, steps, guidance_scale,
|
|
| 1487 |
#Clipping
|
| 1488 |
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1489 |
controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
|
| 1490 |
-
depth_ratio = max(0.1, min(
|
| 1491 |
-
canny_ratio = max(0.1, min(
|
| 1492 |
|
| 1493 |
|
| 1494 |
# KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
|
|
|
|
| 1435 |
#Clipping
|
| 1436 |
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1437 |
controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
|
| 1438 |
+
depth_ratio = max(0.1, min(depth_ratio, 0.9))
|
| 1439 |
+
canny_ratio = max(0.1, min(canny_ratio, 0.9))
|
| 1440 |
|
| 1441 |
|
| 1442 |
# KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
|
|
|
|
| 1446 |
]
|
| 1447 |
|
| 1448 |
print(" 🎨 Anime-Modus: Mehr Freiheit für Stiländerungen")
|
|
|
|
| 1449 |
print(f" Strength: {adj_strength}, ControlNet: {controlnet_strength}")
|
| 1450 |
print(f" Depth: {depth_ratio*100}%, Canny: {canny_ratio*100}%")
|
| 1451 |
print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
|
|
|
|
| 1461 |
controlnet_strength = min(0.9, controlnet_strength * 1.2) # Mehr Kontrolle
|
| 1462 |
|
| 1463 |
# Mehr Depth, weniger Canny
|
| 1464 |
+
depth_ratio = min(0.9, depth_ratio * 1.2) # Mehr Depth
|
| 1465 |
+
canny_ratio = max(0.1, canny_ratio * 0.8) # Weniger Canny
|
| 1466 |
|
| 1467 |
#Clipping
|
| 1468 |
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1469 |
controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
|
| 1470 |
+
depth_ratio = max(0.1, min(depth_ratio, 0.9))
|
| 1471 |
+
canny_ratio = max(0.1, min(canny_ratio, 0.9))
|
| 1472 |
|
| 1473 |
|
| 1474 |
conditioning_scale = [
|
|
|
|
| 1477 |
]
|
| 1478 |
|
| 1479 |
print(" 📸 Drawing-Modus: Mehr Strukturerhalt")
|
|
|
|
| 1480 |
print(f" Strength: {adj_strength}, ControlNet: {controlnet_strength}")
|
| 1481 |
print(f" Depth: {depth_ratio*100}%, Canny: {canny_ratio*100}%")
|
| 1482 |
print(f" Conditioning Scale: [{conditioning_scale[0]:.3f}, {conditioning_scale[1]:.3f}]")
|
|
|
|
| 1485 |
#Clipping
|
| 1486 |
adj_strength = max(0.15, min(adj_strength, 0.95))
|
| 1487 |
controlnet_strength = max(0.1, min(controlnet_strength, 0.9))
|
| 1488 |
+
depth_ratio = max(0.1, min(depth_ratio, 0.9))
|
| 1489 |
+
canny_ratio = max(0.1, min(canny_ratio, 0.9))
|
| 1490 |
|
| 1491 |
|
| 1492 |
# KRITISCH: conditioning_scale HIER definieren (wie bei environment_change)!
|