models
This commit is contained in:
+14
-14
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user