(version: str)
| 734 | |
| 735 | |
| 736 | def get_ltx2_vocoder_config(version: str) -> tuple[dict[str, Any], dict[str, Any], dict[str, Any]]: |
| 737 | if version == "2.0": |
| 738 | config = { |
| 739 | "model_id": "Lightricks/LTX-2", |
| 740 | "diffusers_config": { |
| 741 | "in_channels": 128, |
| 742 | "hidden_channels": 1024, |
| 743 | "out_channels": 2, |
| 744 | "upsample_kernel_sizes": [16, 15, 8, 4, 4], |
| 745 | "upsample_factors": [6, 5, 2, 2, 2], |
| 746 | "resnet_kernel_sizes": [3, 7, 11], |
| 747 | "resnet_dilations": [[1, 3, 5], [1, 3, 5], [1, 3, 5]], |
| 748 | "act_fn": "leaky_relu", |
| 749 | "leaky_relu_negative_slope": 0.1, |
| 750 | "antialias": False, |
| 751 | "final_act_fn": "tanh", |
| 752 | "final_bias": True, |
| 753 | "output_sampling_rate": 24000, |
| 754 | }, |
| 755 | } |
| 756 | rename_dict = LTX_2_0_VOCODER_RENAME_DICT |
| 757 | special_keys_remap = LTX_2_0_VOCODER_SPECIAL_KEYS_REMAP |
| 758 | elif version == "2.3": |
| 759 | config = { |
| 760 | "model_id": "Lightricks/LTX-2.3", |
| 761 | "diffusers_config": { |
| 762 | "in_channels": 128, |
| 763 | "hidden_channels": 1536, |
| 764 | "out_channels": 2, |
| 765 | "upsample_kernel_sizes": [11, 4, 4, 4, 4, 4], |
| 766 | "upsample_factors": [5, 2, 2, 2, 2, 2], |
| 767 | "resnet_kernel_sizes": [3, 7, 11], |
| 768 | "resnet_dilations": [[1, 3, 5], [1, 3, 5], [1, 3, 5]], |
| 769 | "act_fn": "snakebeta", |
| 770 | "leaky_relu_negative_slope": 0.1, |
| 771 | "antialias": True, |
| 772 | "antialias_ratio": 2, |
| 773 | "antialias_kernel_size": 12, |
| 774 | "final_act_fn": None, |
| 775 | "final_bias": False, |
| 776 | "bwe_in_channels": 128, |
| 777 | "bwe_hidden_channels": 512, |
| 778 | "bwe_out_channels": 2, |
| 779 | "bwe_upsample_kernel_sizes": [12, 11, 4, 4, 4], |
| 780 | "bwe_upsample_factors": [6, 5, 2, 2, 2], |
| 781 | "bwe_resnet_kernel_sizes": [3, 7, 11], |
| 782 | "bwe_resnet_dilations": [[1, 3, 5], [1, 3, 5], [1, 3, 5]], |
| 783 | "bwe_act_fn": "snakebeta", |
| 784 | "bwe_leaky_relu_negative_slope": 0.1, |
| 785 | "bwe_antialias": True, |
| 786 | "bwe_antialias_ratio": 2, |
| 787 | "bwe_antialias_kernel_size": 12, |
| 788 | "bwe_final_act_fn": None, |
| 789 | "bwe_final_bias": False, |
| 790 | "filter_length": 512, |
| 791 | "hop_length": 80, |
| 792 | "window_length": 512, |
| 793 | "num_mel_channels": 64, |
no outgoing calls
no test coverage detected
searching dependent graphs…