mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 05:32:12 -03:00
refactor(model_scanner): normalize path comparisons for model roots
fix(example_images_download_manager): re-raise specific exception on download error refactor(usage_stats): define constants locally to avoid conditional imports test(example_images_download_manager): update exception handling in download tests test(example_images_file_manager): differentiate between os.startfile and subprocess.Popen in tests test(example_images_paths): ensure valid example images root with single-library mode test(usage_stats): use string literals for metadata payload to avoid conditional imports
This commit is contained in:
@@ -202,6 +202,11 @@ class DownloadManager:
|
||||
)
|
||||
|
||||
snapshot = self._progress.snapshot()
|
||||
except ExampleImagesDownloadError:
|
||||
# Re-raise our own exception types without wrapping
|
||||
self._is_downloading = False
|
||||
self._download_task = None
|
||||
raise
|
||||
except Exception as e:
|
||||
self._is_downloading = False
|
||||
self._download_task = None
|
||||
|
||||
@@ -13,9 +13,19 @@ from ..services.service_registry import ServiceRegistry
|
||||
# Check if running in standalone mode
|
||||
standalone_mode = os.environ.get("LORA_MANAGER_STANDALONE", "0") == "1" or os.environ.get("HF_HUB_DISABLE_TELEMETRY", "0") == "0"
|
||||
|
||||
# Define constants locally to avoid dependency on conditional imports
|
||||
MODELS = "models"
|
||||
LORAS = "loras"
|
||||
|
||||
if not standalone_mode:
|
||||
from ..metadata_collector.metadata_registry import MetadataRegistry
|
||||
from ..metadata_collector.constants import MODELS, LORAS
|
||||
# Import constants from metadata_collector to ensure consistency, but we have fallbacks defined above
|
||||
try:
|
||||
from ..metadata_collector.constants import MODELS as _MODELS, LORAS as _LORAS
|
||||
MODELS = _MODELS
|
||||
LORAS = _LORAS
|
||||
except ImportError:
|
||||
pass # Use the local definitions
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user