Skip to content

Commit 64f820e

Browse files
committed
Revert DLCLive imports due to unguarded torch
1 parent 29f2604 commit 64f820e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

dlclivegui/services/dlc_processor.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
from typing import Any
1515

1616
import numpy as np
17-
from dlclive import DLCLive
17+
18+
# from dlclive import DLCLive
1819
from PySide6.QtCore import QObject, Signal
1920

2021
from dlclivegui.config import DLCProcessorSettings, ModelType
@@ -23,6 +24,15 @@
2324

2425
logger = logging.getLogger(__name__)
2526

27+
try: # pragma: no cover - optional dependency
28+
from dlclive import (
29+
DLCLive, # type: ignore
30+
)
31+
except Exception as e: # pragma: no cover - handled gracefully
32+
logger.error(f"dlclive package could not be imported: {e}")
33+
DLCLive = None # type: ignore[assignment]
34+
35+
2636
# Enable profiling to get more detailed timing metrics for debugging and optimization.
2737
ENABLE_PROFILING = True
2838

0 commit comments

Comments
 (0)