[diffusion] model: support MOVA (#17704)
Co-authored-by: gaoyang07 <Gary1546308416AL@gmail.com> Co-authored-by: cms42 <c@cms42.top> Co-authored-by: cms42 <44895820+cms42@users.noreply.github.com> Co-authored-by: Ruixiao Li <cgruixiao@outlook.com> Co-authored-by: Li Ruixiao(SII) <80368770+Li-dongyang@users.noreply.github.com>
This commit is contained in:
co-authored by
gaoyang07
cms42
cms42
Ruixiao Li
Li Ruixiao
parent
3fcda00e8c
commit
09a9147f59
@@ -0,0 +1,30 @@
|
||||
# Copied and adapted from: mossVG/mova/diffusion/models/dac_vae.py
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List
|
||||
|
||||
from sglang.multimodal_gen.configs.models.base import ArchConfig, ModelConfig
|
||||
|
||||
|
||||
@dataclass
|
||||
class DacVAEArchConfig(ArchConfig):
|
||||
codebook_dim: int = 8
|
||||
codebook_size: int = 1024
|
||||
continuous: bool = True
|
||||
decoder_dim: int = 2048
|
||||
decoder_rates: List[int] = field(default_factory=lambda: [8, 5, 4, 3, 2])
|
||||
encoder_dim: int = 128
|
||||
encoder_rates: List[int] = field(default_factory=lambda: [2, 3, 4, 5, 8])
|
||||
hop_length: int = 3840
|
||||
latent_dim: int = 128
|
||||
n_codebooks: int = 9
|
||||
quantizer_dropout: bool = False
|
||||
sample_rate: int = 48000
|
||||
|
||||
|
||||
@dataclass
|
||||
class DacVAEConfig(ModelConfig):
|
||||
arch_config: DacVAEArchConfig = field(default_factory=DacVAEArchConfig)
|
||||
load_encoder: bool = True
|
||||
load_decoder: bool = True
|
||||
Reference in New Issue
Block a user