mirror of
https://github.com/storytold/FineTrainers-Conditioning.git
synced 2026-10-22 08:05:17 +00:00
Moved the norm back to prepare latents step.
Now its time to add the adapter layer.
This commit is contained in:
@@ -40,8 +40,6 @@ def _pack_latents(latents: torch.Tensor, patch_size: int = 1, patch_size_t: int
|
||||
|
||||
def post_conditioned_latent_patchify(
|
||||
latents: torch.Tensor,
|
||||
latents_mean: torch.Tensor,
|
||||
latents_std: torch.Tensor,
|
||||
num_frames: int,
|
||||
height: int,
|
||||
width: int,
|
||||
@@ -49,7 +47,6 @@ def post_conditioned_latent_patchify(
|
||||
patch_size_t: int = 1,
|
||||
**kwargs,
|
||||
) -> torch.Tensor:
|
||||
latents = _normalize_latents(latents, latents_mean, latents_std)
|
||||
latents = _pack_latents(latents, patch_size, patch_size_t)
|
||||
return {"latents": latents, "num_frames": num_frames, "height": height, "width": width}
|
||||
|
||||
@@ -76,7 +73,7 @@ def prepare_latents_for_conditioning(
|
||||
|
||||
latents = latents.to(dtype=dtype)
|
||||
_, _, num_frames, height, width = latents.shape
|
||||
# latents = _normalize_latents(latents, vae.latents_mean, vae.latents_std)
|
||||
latents = _normalize_latents(latents, vae.latents_mean, vae.latents_std)
|
||||
# latents = _pack_latents(latents, patch_size, patch_size_t)
|
||||
return {"latents": latents,
|
||||
"num_frames": num_frames,
|
||||
|
||||
Reference in New Issue
Block a user