Skip to content

Commit e05915d

Browse files
committed
Fix duplicated words and a misspelling in messages and docstrings
Remove accidental repeated words in eight "must have have batch size" error messages raised by the modular pipelines, and in two docstrings ("Dimension to to encode", "image batch to be be inpainted"). Also fix "arbitary" to "arbitrary" in the LTX2 pipeline docstring. Text only, no behavior change.
1 parent c401daa commit e05915d

11 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/diffusers/models/unets/unet_spatio_temporal_condition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class UNetSpatioTemporalConditionModel(ModelMixin, AttentionMixin, ConfigMixin,
5050
block_out_channels (`tuple[int]`, *optional*, defaults to `(320, 640, 1280, 1280)`):
5151
The tuple of output channels for each block.
5252
addition_time_embed_dim: (`int`, defaults to 256):
53-
Dimension to to encode the additional time ids.
53+
Dimension to encode the additional time ids.
5454
projection_class_embeddings_input_dim (`int`, defaults to 768):
5555
The dimension of the projection of encoded `added_time_ids`.
5656
layers_per_block (`int`, *optional*, defaults to 2): The number of layers per block.

src/diffusers/modular_pipelines/anima/before_denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def repeat_tensor_to_batch_size(
109109
repeat_by = num_images_per_prompt
110110
else:
111111
raise ValueError(
112-
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
112+
f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
113113
)
114114

115115
# expand the tensor to match the batch_size * num_images_per_prompt

src/diffusers/modular_pipelines/flux/before_denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def intermediate_outputs(self) -> list[OutputParam]:
470470
def check_inputs(image_latents, latents):
471471
if image_latents.shape[0] != latents.shape[0]:
472472
raise ValueError(
473-
f"`image_latents` must have have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
473+
f"`image_latents` must have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
474474
)
475475

476476
if image_latents.ndim != 3:

src/diffusers/modular_pipelines/helios/before_denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def repeat_tensor_to_batch_size(
168168
repeat_by = num_videos_per_prompt
169169
else:
170170
raise ValueError(
171-
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
171+
f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
172172
)
173173

174174
# expand the tensor to match the batch_size * num_videos_per_prompt

src/diffusers/modular_pipelines/qwenimage/before_denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def intermediate_outputs(self) -> list[OutputParam]:
426426
def check_inputs(image_latents, latents):
427427
if image_latents.shape[0] != latents.shape[0]:
428428
raise ValueError(
429-
f"`image_latents` must have have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
429+
f"`image_latents` must have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
430430
)
431431

432432
if image_latents.ndim != 3:

src/diffusers/modular_pipelines/qwenimage/inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def repeat_tensor_to_batch_size(
6868
repeat_by = num_images_per_prompt
6969
else:
7070
raise ValueError(
71-
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
71+
f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
7272
)
7373

7474
# expand the tensor to match the batch_size * num_images_per_prompt

src/diffusers/modular_pipelines/stable_diffusion_3/inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def repeat_tensor_to_batch_size(
7171
repeat_by = num_images_per_prompt
7272
else:
7373
raise ValueError(
74-
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
74+
f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
7575
)
7676

7777
# expand the tensor to match the batch_size * num_images_per_prompt

src/diffusers/modular_pipelines/wan/before_denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def repeat_tensor_to_batch_size(
8181
repeat_by = num_videos_per_prompt
8282
else:
8383
raise ValueError(
84-
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
84+
f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
8585
)
8686

8787
# expand the tensor to match the batch_size * num_videos_per_prompt

src/diffusers/modular_pipelines/z_image/before_denoise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def repeat_tensor_to_batch_size(
8181
repeat_by = num_images_per_prompt
8282
else:
8383
raise ValueError(
84-
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
84+
f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
8585
)
8686

8787
# expand the tensor to match the batch_size * num_images_per_prompt

src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ def __call__(
923923
924924
Args:
925925
image (`torch.Tensor`, `PIL.Image.Image`, `np.ndarray`, `list[torch.Tensor]`, `list[PIL.Image.Image]`, or `list[np.ndarray]`):
926-
`Image`, numpy array or tensor representing an image batch to be be inpainted (which parts of the image
926+
`Image`, numpy array or tensor representing an image batch to be inpainted (which parts of the image
927927
to be masked out with `mask_image` and repainted according to `prompt` and `image_reference`). For both
928928
numpy array and pytorch tensor, the expected value range is between `[0, 1]` If it's a tensor or a list
929929
or tensors, the expected shape should be `(B, C, H, W)` or `(C, H, W)`. If it is a numpy array or a

0 commit comments

Comments
 (0)