from pathlib import Path

PROJECT_ROOT = Path("/home/ceshi/mysora")
OUTPUT_DIR   = Path("/data/train-output/api-outputs")
VENV_DIR     = Path("/home/ceshi/venv")
TORCHRUN     = VENV_DIR / "bin" / "torchrun"

REDIS_URL = "redis://localhost:6379/0"

# 每张 GPU 加载一份模型，256px 单卡峰值 ~52.5GB，A100 80GB 完全可行
NUM_GPUS = 8

# 推理配置（复用现有 256px/768px config）
INFERENCE_CONFIGS = {
    "256px": "configs/diffusion/inference/256px.py",
    "768px": "configs/diffusion/inference/768px.py",
}

# 每个任务最长等待时间（秒）。256px ~60s，768px ~1700s
TASK_TIMEOUT = {
    "256px": 300,
    "768px": 3600,
}
