mysora/api/config.py

24 lines
657 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.5GBA100 80GB 完全可行
NUM_GPUS = 8
# 推理配置(复用现有 256px/768px config
INFERENCE_CONFIGS = {
"256px": "configs/diffusion/inference/256px.py",
"768px": "configs/diffusion/inference/768px.py",
}
# 每个任务最长等待时间。256px ~60s768px ~1700s
TASK_TIMEOUT = {
"256px": 300,
"768px": 3600,
}