refactor: unify standalone mode check using environment variable

This commit is contained in:
Will Miao
2025-09-21 22:45:11 +08:00
parent 7e20f738fb
commit fec85bcc08
8 changed files with 15 additions and 12 deletions

View File

@@ -10,6 +10,10 @@ import sys
import os
from pathlib import Path
# Set environment variable to indicate standalone mode
# HF_HUB_DISABLE_TELEMETRY is from ComfyUI main.py
standalone_mode = os.environ.get("HF_HUB_DISABLE_TELEMETRY", "0") == "0"
def main():
"""Run pytest from the tests directory to avoid import issues."""
# Get the script directory