Spaces:
Runtime error
Runtime error
Update generator.py
Browse files- generator.py +6 -0
generator.py
CHANGED
|
@@ -874,6 +874,12 @@ class RetroArtConverter:
|
|
| 874 |
|
| 875 |
pipe_kwargs["control_image"] = control_images
|
| 876 |
pipe_kwargs["controlnet_conditioning_scale"] = conditioning_scales
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 877 |
print(f"Active ControlNets: {len(control_images)} (all {target_width}x{target_height})")
|
| 878 |
else:
|
| 879 |
print("No active ControlNets, running standard Img2Img")
|
|
|
|
| 874 |
|
| 875 |
pipe_kwargs["control_image"] = control_images
|
| 876 |
pipe_kwargs["controlnet_conditioning_scale"] = conditioning_scales
|
| 877 |
+
|
| 878 |
+
# --- START FIX: Explicitly define guidance start/end ---
|
| 879 |
+
num_controlnets = len(control_images)
|
| 880 |
+
pipe_kwargs["control_guidance_start"] = [0.0] * num_controlnets
|
| 881 |
+
pipe_kwargs["control_guidance_end"] = [1.0] * num_controlnets
|
| 882 |
+
# --- END FIX ---
|
| 883 |
print(f"Active ControlNets: {len(control_images)} (all {target_width}x{target_height})")
|
| 884 |
else:
|
| 885 |
print("No active ControlNets, running standard Img2Img")
|