This commit is contained in:
Holden
2026-06-10 19:34:14 -04:00
parent 0ade7f0da1
commit 3759b57b40
+14 -14
View File
@@ -24,23 +24,23 @@ INSIGHTFACE_DIR = os.environ.get("INSIGHTFACE_HOME", "/models/insightface")
RUN_ENV = {**os.environ, "PYTHONUNBUFFERED": "1"} RUN_ENV = {**os.environ, "PYTHONUNBUFFERED": "1"}
def check_models(): check_models() {
"""Log model download status before each run.""" echo "📦 Checking models..."
print("📦 Checking models...", flush=True)
buffalo = Path(INSIGHTFACE_DIR) / "models" / "buffalo_l" if [ -d "/models/insightface/models/buffalo_l" ]; then
if buffalo.exists(): echo " ✅ InsightFace Buffalo_L: present"
print(" ✅ InsightFace Buffalo_L: downloaded", flush=True) else
else: echo " ⬇️ InsightFace Buffalo_L: not found — will download on first run (~300MB)"
print(" ⬇️ InsightFace Buffalo_L: downloading (~300MB)...", flush=True) fi
hf_hub = Path(MODELS_DIR) / "hub" if [ -d "/models/huggingface/hub" ] && [ "$(find /models/huggingface/hub -maxdepth 1 -type d 2>/dev/null | wc -l)" -gt 1 ]; then
if hf_hub.exists() and any(hf_hub.iterdir()): echo " ✅ HuggingFace models: present"
print(" ✅ HuggingFace models: downloaded", flush=True) else
else: echo " ⬇️ HuggingFace models: not found — will download on first run (SigLIP ~1GB, YOLOv9c ~500MB)"
print(" ⬇️ HuggingFace models: downloading (SigLIP ~1GB, YOLOv9c ~500MB)...", flush=True) fi
print("🚀 Starting if-curator...", flush=True) echo "🚀 Starting if-curator..."
}
def calc_time_display(seconds): def calc_time_display(seconds):