Commit 34de0189 authored by dmMaze's avatar dmMaze
Browse files

fix threading for headless mode

parent d199de76
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -230,6 +230,9 @@ def main():

    from ui.mainwindow import MainWindow

    if args.headless:
        config.module.load_model_on_demand = True
        config.module.empty_runcache = True
    ballontrans = MainWindow(app, config, open_dir=args.proj_dir, **vars(args))
    global BT
    BT = ballontrans
+4 −4
Original line number Diff line number Diff line
@@ -659,13 +659,13 @@ class ModuleManager(QObject):

    def terminateRunningThread(self):
        if self.textdetect_thread.isRunning():
            self.textdetect_thread.terminate()
            self.textdetect_thread.quit()
        if self.ocr_thread.isRunning():
            self.ocr_thread.terminate()
            self.ocr_thread.quit()
        if self.inpaint_thread.isRunning():
            self.inpaint_thread.terminate()
            self.inpaint_thread.quit()
        if self.translate_thread.isRunning():
            self.translate_thread.terminate()
            self.translate_thread.quit()

    def runImgtransPipeline(self):
        if self.imgtrans_proj.is_empty: