Skip to content

Commit 79d1617

Browse files
guiyrthlky
andauthored
Update src/diffusers/pipelines/flux/pipeline_flux.py
Co-authored-by: hlky <[email protected]>
1 parent 5d482ca commit 79d1617

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/diffusers/pipelines/flux/pipeline_flux.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -872,11 +872,9 @@ def __call__(
872872
if (ip_adapter_image is not None or ip_adapter_image_embeds is not None) and (
873873
negative_ip_adapter_image is None and negative_ip_adapter_image_embeds is None
874874
):
875-
negative_ip_adapter_image = (
876-
[np.zeros((width, height, 3), dtype=np.uint8) for _ in range(len(ip_adapter_image))]
877-
if isinstance(ip_adapter_image, list)
878-
else np.zeros((width, height, 3), dtype=np.uint8)
879-
)
875+
negative_ip_adapter_image = np.zeros((width, height, 3), dtype=np.uint8)
876+
if isinstance(ip_adapter_image, list):
877+
negative_ip_adapter_image = [negative_ip_adapter_image] * len(ip_adapter_image)
880878
elif (ip_adapter_image is None and ip_adapter_image_embeds is None) and (
881879
negative_ip_adapter_image is not None or negative_ip_adapter_image_embeds is not None
882880
):

0 commit comments

Comments
 (0)