diff --git a/src/diffusers/modular_pipelines/anima/before_denoise.py b/src/diffusers/modular_pipelines/anima/before_denoise.py index dbfe82d7f35d..ede832c9d80b 100644 --- a/src/diffusers/modular_pipelines/anima/before_denoise.py +++ b/src/diffusers/modular_pipelines/anima/before_denoise.py @@ -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) diff --git a/src/diffusers/modular_pipelines/components_manager.py b/src/diffusers/modular_pipelines/components_manager.py index 31ba2c942203..3827defa0f31 100644 --- a/src/diffusers/modular_pipelines/components_manager.py +++ b/src/diffusers/modular_pipelines/components_manager.py @@ -172,7 +172,7 @@ def __call__(self, hooks, model_id, model, execution_device): try: mem_on_device = device_module.mem_get_info(execution_device.index)[0] except AttributeError: - raise AttributeError(f"Do not know how to obtain obtain memory info for {str(device_module)}.") + raise AttributeError(f"Do not know how to obtain memory info for {str(device_module)}.") mem_on_device = mem_on_device - self.memory_reserve_margin if current_module_size < mem_on_device: diff --git a/src/diffusers/modular_pipelines/flux/before_denoise.py b/src/diffusers/modular_pipelines/flux/before_denoise.py index 2d41cd76cd93..243f9e927d74 100644 --- a/src/diffusers/modular_pipelines/flux/before_denoise.py +++ b/src/diffusers/modular_pipelines/flux/before_denoise.py @@ -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: diff --git a/src/diffusers/modular_pipelines/helios/before_denoise.py b/src/diffusers/modular_pipelines/helios/before_denoise.py index 64407db63cca..593843d48272 100644 --- a/src/diffusers/modular_pipelines/helios/before_denoise.py +++ b/src/diffusers/modular_pipelines/helios/before_denoise.py @@ -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) diff --git a/src/diffusers/modular_pipelines/qwenimage/before_denoise.py b/src/diffusers/modular_pipelines/qwenimage/before_denoise.py index 51b5c6ac8c3d..b928bf7fce9e 100644 --- a/src/diffusers/modular_pipelines/qwenimage/before_denoise.py +++ b/src/diffusers/modular_pipelines/qwenimage/before_denoise.py @@ -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: diff --git a/src/diffusers/modular_pipelines/qwenimage/inputs.py b/src/diffusers/modular_pipelines/qwenimage/inputs.py index faec7db245df..38a49e07345f 100644 --- a/src/diffusers/modular_pipelines/qwenimage/inputs.py +++ b/src/diffusers/modular_pipelines/qwenimage/inputs.py @@ -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) diff --git a/src/diffusers/modular_pipelines/stable_diffusion_3/inputs.py b/src/diffusers/modular_pipelines/stable_diffusion_3/inputs.py index 401ff2db5c61..d7e88b571612 100644 --- a/src/diffusers/modular_pipelines/stable_diffusion_3/inputs.py +++ b/src/diffusers/modular_pipelines/stable_diffusion_3/inputs.py @@ -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) diff --git a/src/diffusers/modular_pipelines/wan/before_denoise.py b/src/diffusers/modular_pipelines/wan/before_denoise.py index 6b0874037b0d..a737f9811cda 100644 --- a/src/diffusers/modular_pipelines/wan/before_denoise.py +++ b/src/diffusers/modular_pipelines/wan/before_denoise.py @@ -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) diff --git a/src/diffusers/modular_pipelines/z_image/before_denoise.py b/src/diffusers/modular_pipelines/z_image/before_denoise.py index 9b6c1976a1bf..aa32debb2306 100644 --- a/src/diffusers/modular_pipelines/z_image/before_denoise.py +++ b/src/diffusers/modular_pipelines/z_image/before_denoise.py @@ -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)