Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
masked_image_latents = self._pack_latents(
masked_image_latents,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
return mask, masked_image_latents

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)

return mask, masked_image_latents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)

return mask, masked_image_latents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
return mask, masked_image_latents

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def prepare_mask_latents(
masked_image_latents = torch.cat(new_mask_pixel_values, dim=0)
masked_image_latents = masked_image_latents * self.vae.config.scaling_factor

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
else:
masked_image_latents = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
masked_image_latents = self._pack_latents(
masked_image_latents,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
masked_image_latents = self._pack_latents(
masked_image_latents,
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/flux/pipeline_flux_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
masked_image_latents = self._pack_latents(
masked_image_latents,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
masked_image_latents = self._pack_latents(
masked_image_latents,
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/ltx2/pipeline_ltx2.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def __init__(
self.vae_temporal_compression_ratio = (
self.vae.temporal_compression_ratio if getattr(self, "vae", None) is not None else 8
)
# TODO: check whether the MEL compression ratio logic here is corrct
# TODO: check whether the MEL compression ratio logic here is correct
self.audio_vae_mel_compression_ratio = (
self.audio_vae.mel_compression_ratio if getattr(self, "audio_vae", None) is not None else 4
)
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0):

class LTX2ConditionPipeline(DiffusionPipeline, FromSingleFileMixin, LTX2LoraLoaderMixin):
r"""
Pipeline for video generation which allows image conditions to be inserted at arbitary parts of the video.
Pipeline for video generation which allows image conditions to be inserted at arbitrary parts of the video.

Reference: https://github.com/Lightricks/LTX-Video

Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/ltx2/pipeline_ltx2_image2video.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(
self.vae_temporal_compression_ratio = (
self.vae.temporal_compression_ratio if getattr(self, "vae", None) is not None else 8
)
# TODO: check whether the MEL compression ratio logic here is corrct
# TODO: check whether the MEL compression ratio logic here is correct
self.audio_vae_mel_compression_ratio = (
self.audio_vae.mel_compression_ratio if getattr(self, "audio_vae", None) is not None else 4
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
return mask, masked_image_latents

Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
return mask, masked_image_latents

Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/pag/pipeline_pag_sd_xl_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)

return mask, masked_image_latents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)

masked_image_latents = self._pack_latents(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def prepare_mask_latents(
)
masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1, 1)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)

masked_image_latents = self._pack_latents(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
return mask, masked_image_latents

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)
return mask, masked_image_latents

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def prepare_mask_latents(
torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents
)

# aligning device to prevent device errors when concating it with the latent model input
# aligning device to prevent device errors when concatenating it with the latent model input
masked_image_latents = masked_image_latents.to(device=device, dtype=dtype)

return mask, masked_image_latents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def check_inputs(
f"got {type(task_prompt)} and {type(content_prompt)}"
)
if len(content_prompt) != len(task_prompt):
raise ValueError("`task_prompt` and `content_prompt` must have the same length whe they are lists.")
raise ValueError("`task_prompt` and `content_prompt` must have the same length when they are lists.")

for sample in image:
if not isinstance(sample, list) or not isinstance(sample[0], list):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def check_inputs(
f"got {type(task_prompt)} and {type(content_prompt)}"
)
if len(content_prompt) != len(task_prompt):
raise ValueError("`task_prompt` and `content_prompt` must have the same length whe they are lists.")
raise ValueError("`task_prompt` and `content_prompt` must have the same length when they are lists.")

for sample in image:
if not isinstance(sample, list) or not isinstance(sample[0], list):
Expand Down
Loading