Spaces:
Runtime error
Runtime error
Update generator.py
Browse files- generator.py +4 -1
generator.py
CHANGED
|
@@ -384,7 +384,10 @@ class RetroArtConverter:
|
|
| 384 |
|
| 385 |
elif using_multiple_controlnets and not has_detected_faces:
|
| 386 |
print("Multiple ControlNets available but no faces detected, using depth only")
|
| 387 |
-
|
|
|
|
|
|
|
|
|
|
| 388 |
conditioning_scales = [0.0, depth_control_scale]
|
| 389 |
face_embeddings = None
|
| 390 |
|
|
|
|
| 384 |
|
| 385 |
elif using_multiple_controlnets and not has_detected_faces:
|
| 386 |
print("Multiple ControlNets available but no faces detected, using depth only")
|
| 387 |
+
# The InstantID controlnet (index 0) still needs an image input.
|
| 388 |
+
# We provide a blank image and set its scale to 0.0 to disable it.
|
| 389 |
+
blank_image = Image.new("RGB", depth_image.size, (0, 0, 0))
|
| 390 |
+
control_image = [blank_image, depth_image]
|
| 391 |
conditioning_scales = [0.0, depth_control_scale]
|
| 392 |
face_embeddings = None
|
| 393 |
|