Skip to content

Commit 7c2151f

Browse files
committed
up
1 parent 0cc1905 commit 7c2151f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/diffusers/pipelines/ltx/pipeline_ltx_condition.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ def check_inputs(
463463

464464

465465
@staticmethod
466-
# adapted from diffusers.pipelines.ltx.pipeline_ltx.LTXPipeline._pack_latents
467466
def _prepare_video_ids(batch_size: int, num_frames: int, height: int, width: int, patch_size: int = 1, patch_size_t: int = 1, device: torch.device = None) -> torch.Tensor:
468467

469468
latent_sample_coords = torch.meshgrid(
@@ -480,7 +479,6 @@ def _prepare_video_ids(batch_size: int, num_frames: int, height: int, width: int
480479

481480

482481
@staticmethod
483-
# adapted from diffusers.pipelines.ltx.pipeline_ltx.LTXPipeline._pack_latents
484482
def _scale_video_ids(video_ids: torch.Tensor, scale_factor: int = 32, scale_factor_t: int = 8, frame_index: int = 0, device: torch.device = None) -> torch.Tensor:
485483

486484
scaled_latent_coords = (
@@ -493,7 +491,7 @@ def _scale_video_ids(video_ids: torch.Tensor, scale_factor: int = 32, scale_fact
493491
return scaled_latent_coords
494492

495493
@staticmethod
496-
# adapted from diffusers.pipelines.ltx.pipeline_ltx.LTXPipeline._pack_latents
494+
# Copied from diffusers.pipelines.ltx.pipeline_ltx.LTXPipeline._pack_latents
497495
def _pack_latents(latents: torch.Tensor, patch_size: int = 1, patch_size_t: int = 1, device: torch.device = None) -> torch.Tensor:
498496
# Unpacked latents of shape are [B, C, F, H, W] are patched into tokens of shape [B, C, F // p_t, p_t, H // p, p, W // p, p].
499497
# The patch dimensions are then permuted and collapsed into the channel dimension of shape:

0 commit comments

Comments
 (0)