Skip to content

Commit 339c0b4

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

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
@@ -878,11 +878,9 @@ def __call__(
878878
elif (ip_adapter_image is None and ip_adapter_image_embeds is None) and (
879879
negative_ip_adapter_image is not None or negative_ip_adapter_image_embeds is not None
880880
):
881-
ip_adapter_image = (
882-
[np.zeros((width, height, 3), dtype=np.uint8) for _ in range(len(negative_ip_adapter_image))]
883-
if isinstance(negative_ip_adapter_image, list)
884-
else np.zeros((width, height, 3), dtype=np.uint8)
885-
)
881+
ip_adapter_image = np.zeros((width, height, 3), dtype=np.uint8)
882+
if isinstance(negative_ip_adapter_image, list):
883+
ip_adapter_image = [ip_adapter_image] * len(negative_ip_adapter_image)
886884

887885
if self.joint_attention_kwargs is None:
888886
self._joint_attention_kwargs = {}

0 commit comments

Comments
 (0)