mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-20 23:58:12 +00:00
refactor patchify
This commit is contained in:
@@ -167,6 +167,20 @@ class AudioPatchifier(Patchifier):
|
||||
|
||||
return audio_latents
|
||||
|
||||
def unpatchify_audio(
|
||||
self,
|
||||
audio_latents: torch.Tensor,
|
||||
channels: int,
|
||||
mel_bins: int
|
||||
) -> torch.Tensor:
|
||||
audio_latents = einops.rearrange(
|
||||
audio_latents,
|
||||
"b t (c f) -> b c t f",
|
||||
c=channels,
|
||||
f=mel_bins,
|
||||
)
|
||||
return audio_latents
|
||||
|
||||
def get_patch_grid_bounds(
|
||||
self,
|
||||
output_shape: AudioLatentShape | VideoLatentShape,
|
||||
|
||||
Reference in New Issue
Block a user