|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from enum import Enum |
|
|
|
|
|
from cosmos_predict1.tokenizer.modules.distributions import GaussianDistribution, IdentityDistribution |
|
|
from cosmos_predict1.tokenizer.modules.layers2d import Decoder, Encoder |
|
|
from cosmos_predict1.tokenizer.modules.layers3d import DecoderBase, DecoderFactorized, EncoderBase, EncoderFactorized, DecoderFactorizedVanilla, DecoderBaseVanilla |
|
|
from cosmos_predict1.tokenizer.modules.quantizers import FSQuantizer, LFQuantizer, ResidualFSQuantizer, VectorQuantizer |
|
|
|
|
|
|
|
|
class EncoderType(Enum): |
|
|
Default = Encoder |
|
|
|
|
|
|
|
|
class DecoderType(Enum): |
|
|
Default = Decoder |
|
|
|
|
|
|
|
|
class Encoder3DType(Enum): |
|
|
BASE = EncoderBase |
|
|
FACTORIZED = EncoderFactorized |
|
|
|
|
|
|
|
|
class Decoder3DType(Enum): |
|
|
BASE = DecoderBase |
|
|
FACTORIZED = DecoderFactorized |
|
|
FACTORIZEDVanilla = DecoderFactorizedVanilla |
|
|
BASEVanilla = DecoderBaseVanilla |
|
|
|
|
|
|
|
|
class ContinuousFormulation(Enum): |
|
|
VAE = GaussianDistribution |
|
|
AE = IdentityDistribution |
|
|
|
|
|
|
|
|
class DiscreteQuantizer(Enum): |
|
|
VQ = VectorQuantizer |
|
|
LFQ = LFQuantizer |
|
|
FSQ = FSQuantizer |
|
|
RESFSQ = ResidualFSQuantizer |
|
|
|