ldm-vq-f16 / configuration_vqmodel.py
ktrk115's picture
Upload model
1c389fc verified
raw
history blame contribute delete
552 Bytes
"""VQModel configuration"""
from transformers import PretrainedConfig
from transformers.utils import logging
logger = logging.get_logger(__name__)
class VQModelConfig(PretrainedConfig): # type: ignore
model_type = "vqmodel"
def __init__(
self,
repo_id: str | None = None,
yaml_path: str | None = None,
**kwargs: dict,
) -> None:
if repo_id is not None:
yaml_path = "config.yaml"
self.repo_id = repo_id
self.yaml_path = yaml_path
super().__init__(**kwargs)