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 @@ -544,6 +544,7 @@ def prepare_latents(

# Reshape to match latent dimensions [batch, 1, height, width, channels]
image_latents = image_latents.permute(0, 2, 3, 4, 1) # [batch, 1, H, W, C]
image_latents = image_latents.to(device=latents.device, dtype=latents.dtype)
latents = torch.cat([latents, image_latents, torch.ones_like(latents[..., :1])], -1)

return latents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ def prepare_latents(

# Reshape to match latent dimensions [batch, frames, height, width, channels]
image_latents = image_latents.permute(0, 2, 3, 4, 1) # [batch, 1, H, W, C]
image_latents = image_latents.to(device=latents.device, dtype=latents.dtype)

# Replace first frame with encoded image
latents[:, 0:1] = image_latents
Expand Down
Loading