Skip to content

Commit a98aab8

Browse files
committed
fi:x: prevent PyQt <-> torch DLL conflict
1 parent 46f4cbe commit a98aab8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
# Add src to path for running as script
88
sys.path.insert(0, str(Path(__file__).parent))
99

10+
# Import torch BEFORE PyQt6 to avoid DLL conflict on Windows.
11+
# PyQt6's Qt DLLs interfere with PyTorch's c10.dll if loaded first.
12+
import torch # noqa: F401
13+
1014
from PyQt6.QtWidgets import QApplication, QDialog
1115
from ui.main_window import MainWindow, main as original_main
1216
from ui.start_screen import StartScreen

0 commit comments

Comments
 (0)