X Tutup
Skip to content

add ltx2 vae in sana-video;#13229

Open
lawrence-cj wants to merge 2 commits intohuggingface:mainfrom
lawrence-cj:sana-video-ltx2vae
Open

add ltx2 vae in sana-video;#13229
lawrence-cj wants to merge 2 commits intohuggingface:mainfrom
lawrence-cj:sana-video-ltx2vae

Conversation

@lawrence-cj
Copy link
Contributor

@lawrence-cj lawrence-cj commented Mar 9, 2026

This PR adds LTX-VAE support for SANA-Video.

Cc: @dg845 @sayakpaul

@sayakpaul
Copy link
Member

@lawrence-cj thanks for the PR! Could you also provide some sample outputs?

Comment on lines +226 to +244
if getattr(self, "vae", None):
if hasattr(self.vae.config, "scale_factor_temporal"):
self.vae_scale_factor_temporal = self.vae.config.scale_factor_temporal
elif hasattr(self.vae.config, "temporal_compression_ratio"):
# LTX2 VAE uses temporal_compression_ratio
self.vae_scale_factor_temporal = self.vae.config.temporal_compression_ratio
else:
self.vae_scale_factor_temporal = getattr(self.vae, "temporal_compression_ratio", 4)

if hasattr(self.vae.config, "scale_factor_spatial"):
self.vae_scale_factor_spatial = self.vae.config.scale_factor_spatial
elif hasattr(self.vae.config, "spatial_compression_ratio"):
# LTX2 VAE uses spatial_compression_ratio
self.vae_scale_factor_spatial = self.vae.config.spatial_compression_ratio
else:
self.vae_scale_factor_spatial = getattr(self.vae, "spatial_compression_ratio", 8)
else:
self.vae_scale_factor_temporal = 4
self.vae_scale_factor_spatial = 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, should this be conditioned on the class type of the VAE being used?

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I just left one comment. But it looks good to me.

@sayakpaul sayakpaul requested a review from dg845 March 10, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup