MCPcopy Index your code
hub / github.com/huggingface/diffusers / get_ltx2_audio_vae_config

Function get_ltx2_audio_vae_config

scripts/convert_ltx2_to_diffusers.py:656–707  ·  view source on GitHub ↗
(version: str)

Source from the content-addressed store, hash-verified

654
655
656def get_ltx2_audio_vae_config(version: str) -> tuple[dict[str, Any], dict[str, Any], dict[str, Any]]:
657 if version == "2.0":
658 config = {
659 "model_id": "Lightricks/LTX-2",
660 "diffusers_config": {
661 "base_channels": 128,
662 "output_channels": 2,
663 "ch_mult": (1, 2, 4),
664 "num_res_blocks": 2,
665 "attn_resolutions": None,
666 "in_channels": 2,
667 "resolution": 256,
668 "latent_channels": 8,
669 "norm_type": "pixel",
670 "causality_axis": "height",
671 "dropout": 0.0,
672 "mid_block_add_attention": False,
673 "sample_rate": 16000,
674 "mel_hop_length": 160,
675 "is_causal": True,
676 "mel_bins": 64,
677 "double_z": True,
678 },
679 }
680 rename_dict = LTX_2_0_AUDIO_VAE_RENAME_DICT
681 special_keys_remap = LTX_2_0_AUDIO_VAE_SPECIAL_KEYS_REMAP
682 elif version == "2.3":
683 config = {
684 "model_id": "Lightricks/LTX-2.3",
685 "diffusers_config": {
686 "base_channels": 128,
687 "output_channels": 2,
688 "ch_mult": (1, 2, 4),
689 "num_res_blocks": 2,
690 "attn_resolutions": None,
691 "in_channels": 2,
692 "resolution": 256,
693 "latent_channels": 8,
694 "norm_type": "pixel",
695 "causality_axis": "height",
696 "dropout": 0.0,
697 "mid_block_add_attention": False,
698 "sample_rate": 16000,
699 "mel_hop_length": 160,
700 "is_causal": True,
701 "mel_bins": 64,
702 "double_z": True,
703 }, # Same config as LTX-2.0
704 }
705 rename_dict = LTX_2_0_AUDIO_VAE_RENAME_DICT
706 special_keys_remap = LTX_2_0_AUDIO_VAE_SPECIAL_KEYS_REMAP
707 return config, rename_dict, special_keys_remap
708
709
710def convert_ltx2_audio_vae(original_state_dict: dict[str, Any], version: str) -> dict[str, Any]:

Callers 1

convert_ltx2_audio_vaeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…