Files
revids/app/config.py
T
mteehan a33a3a593d Fix API to match actual ltx-pipelines 1.1.5 interface
- Use DistilledPipeline constructor (not from_config)
- Use ImageConditioningInput namedtuple for image conditioning
- Use LoraPathStrengthAndSDOps for LoRA config
- Use QuantizationPolicy with fp8_cast sd_ops directly
- Update spatial_upsampler to required x2-1.1 model
- Update gemma_root to google/gemma-3-12b-it-qat-q4_0-unquantized
- Handle video output as Iterator[torch.Tensor] from pipeline
- Flesh out README with all model download commands, endpoint docs, env vars, frame/resolution tables
2026-06-01 19:37:16 -04:00

42 lines
1.1 KiB
Python

from __future__ import annotations
import os
from typing import Optional
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
app_name: str = "Revids"
host: str = "0.0.0.0"
port: int = 8000
reload: bool = True
# LTX-2.3 model paths (update after downloading from HuggingFace)
ltx_distilled_checkpoint: str = "models/ltx-2.3-22b-distilled-1.1.safetensors"
ltx_gemma_root: str = "models/gemma-3-12b-it-qat-q4_0-unquantized"
ltx_spatial_upsampler: str = "models/ltx-2.3-spatial-upscaler-x2-1.1.safetensors"
ltx_device: str = "cuda"
ltx_quantization: str = "fp8_cast"
ltx_loras: list[str] = []
video_output_dir: str = os.path.join(os.path.dirname(os.path.dirname(__file__)), "videos")
# DB
db_path: str = os.path.join(os.path.dirname(__file__), "jobs.db")
# Generation defaults
default_frames: int = 65
default_fps: float = 24.0
default_width: int = 768
default_height: int = 512
# Concurrency
max_concurrent_jobs: int = 1
model_config = {"env_prefix": "REVIDS_", "env_file": ".env"}
settings = Settings()