Fix duplicated words and a misspelling in messages and docstrings by Sreekant13 · Pull Request #14287 · huggingface/diffusers · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/diffusers/modular_pipelines/anima/before_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ def repeat_tensor_to_batch_size(
elif input_tensor.shape[0] == batch_size:
repeat_by = num_images_per_prompt
else:
raise ValueError(
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
)
raise ValueError(f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}")

# expand the tensor to match the batch_size * num_images_per_prompt
input_tensor = input_tensor.repeat_interleave(repeat_by, dim=0)
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/modular_pipelines/flux/before_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def intermediate_outputs(self) -> list[OutputParam]:
def check_inputs(image_latents, latents):
if image_latents.shape[0] != latents.shape[0]:
raise ValueError(
f"`image_latents` must have have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
f"`image_latents` must have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
)

if image_latents.ndim != 3:
Expand Down
4 changes: 1 addition & 3 deletions src/diffusers/modular_pipelines/helios/before_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ def repeat_tensor_to_batch_size(
elif input_tensor.shape[0] == batch_size:
repeat_by = num_videos_per_prompt
else:
raise ValueError(
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
)
raise ValueError(f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}")

# expand the tensor to match the batch_size * num_videos_per_prompt
input_tensor = input_tensor.repeat_interleave(repeat_by, dim=0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def intermediate_outputs(self) -> list[OutputParam]:
def check_inputs(image_latents, latents):
if image_latents.shape[0] != latents.shape[0]:
raise ValueError(
f"`image_latents` must have have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
f"`image_latents` must have same batch size as `latents`, but got {image_latents.shape[0]} and {latents.shape[0]}"
)

if image_latents.ndim != 3:
Expand Down
4 changes: 1 addition & 3 deletions src/diffusers/modular_pipelines/qwenimage/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ def repeat_tensor_to_batch_size(
elif input_tensor.shape[0] == batch_size:
repeat_by = num_images_per_prompt
else:
raise ValueError(
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
)
raise ValueError(f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}")

# expand the tensor to match the batch_size * num_images_per_prompt
input_tensor = input_tensor.repeat_interleave(repeat_by, dim=0)
Expand Down
4 changes: 1 addition & 3 deletions src/diffusers/modular_pipelines/stable_diffusion_3/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ def repeat_tensor_to_batch_size(
elif input_tensor.shape[0] == batch_size:
repeat_by = num_images_per_prompt
else:
raise ValueError(
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
)
raise ValueError(f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}")

# expand the tensor to match the batch_size * num_images_per_prompt
input_tensor = input_tensor.repeat_interleave(repeat_by, dim=0)
Expand Down
4 changes: 1 addition & 3 deletions src/diffusers/modular_pipelines/wan/before_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ def repeat_tensor_to_batch_size(
elif input_tensor.shape[0] == batch_size:
repeat_by = num_videos_per_prompt
else:
raise ValueError(
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
)
raise ValueError(f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}")

# expand the tensor to match the batch_size * num_videos_per_prompt
input_tensor = input_tensor.repeat_interleave(repeat_by, dim=0)
Expand Down
4 changes: 1 addition & 3 deletions src/diffusers/modular_pipelines/z_image/before_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ def repeat_tensor_to_batch_size(
elif input_tensor.shape[0] == batch_size:
repeat_by = num_images_per_prompt
else:
raise ValueError(
f"`{input_name}` must have have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}"
)
raise ValueError(f"`{input_name}` must have batch size 1 or {batch_size}, but got {input_tensor.shape[0]}")

# expand the tensor to match the batch_size * num_images_per_prompt
input_tensor = input_tensor.repeat_interleave(repeat_by, dim=0)
Expand Down
4 changes: 2 additions & 2 deletions src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,8 @@ def __call__(

Args:
image (`torch.Tensor`, `PIL.Image.Image`, `np.ndarray`, `list[torch.Tensor]`, `list[PIL.Image.Image]`, or `list[np.ndarray]`):
`Image`, numpy array or tensor representing an image batch to be be inpainted (which parts of the image
to be masked out with `mask_image` and repainted according to `prompt` and `image_reference`). For both
`Image`, numpy array or tensor representing an image batch to be inpainted (which parts of the image to
be masked out with `mask_image` and repainted according to `prompt` and `image_reference`). For both
numpy array and pytorch tensor, the expected value range is between `[0, 1]` If it's a tensor or a list
or tensors, the expected shape should be `(B, C, H, W)` or `(C, H, W)`. If it is a numpy array or a
list of arrays, the expected shape should be `(B, H, W, C)` or `(H, W, C)` It can also accept image
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py
Loading