staged/sequential pipeline modes + dark themed Qt GUI
This commit is contained in:
26
main.py
26
main.py
@@ -1,17 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Song Transcriber v3 — Qt GUI entry point.
|
||||
|
||||
Run: python main.py
|
||||
"""
|
||||
"""Song Transcriber — Qt GUI entry point."""
|
||||
from __future__ import annotations
|
||||
|
||||
import ctypes
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Must be set BEFORE PySide6 is imported.
|
||||
os.environ.setdefault("QT_LOGGING_RULES", "qt.qpa.wayland.textinput=false")
|
||||
|
||||
|
||||
def preload_cudnn() -> None:
|
||||
"""Preload cuDNN shared libraries so torch / onnxruntime can find them."""
|
||||
try:
|
||||
import nvidia.cudnn
|
||||
except ImportError:
|
||||
@@ -27,13 +26,30 @@ def preload_cudnn() -> None:
|
||||
pass
|
||||
|
||||
|
||||
def enable_tf32() -> None:
|
||||
"""Enable TF32 for faster matmul on Ampere+ GPUs (RTX 30/40 series)."""
|
||||
try:
|
||||
import torch
|
||||
if torch.cuda.is_available():
|
||||
torch.backends.cuda.matmul.allow_tf32 = True
|
||||
torch.backends.cudnn.allow_tf32 = True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
def main() -> int:
|
||||
preload_cudnn()
|
||||
enable_tf32()
|
||||
|
||||
from PySide6.QtWidgets import QApplication
|
||||
from gui.theme import DARK_STYLESHEET
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName("Audio Transcriber")
|
||||
app.setStyle("Fusion")
|
||||
app.setStyleSheet(DARK_STYLESHEET)
|
||||
|
||||
window = MainWindow()
|
||||
window.show()
|
||||
return app.exec()
|
||||
|
||||
Reference in New Issue
Block a user