primerz commited on
Commit
e17ae56
·
verified ·
1 Parent(s): a593145

Update generator.py

Browse files
Files changed (1) hide show
  1. 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
- control_image = [depth_image, depth_image]
 
 
 
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