diff --git a/REAL-Video-Enhancer.py b/REAL-Video-Enhancer.py index 64e9a491..028912f0 100644 --- a/REAL-Video-Enhancer.py +++ b/REAL-Video-Enhancer.py @@ -380,10 +380,9 @@ def onRenderCompletion(self): pass # pass just incase internet error caused a skip # reset image preview self.previewLabel.clear() - self.startRenderButton.setVisible(True) - self.pauseRenderButton.setVisible(False) self.startRenderButton.clicked.disconnect() self.startRenderButton.clicked.connect(self.startRender) + self.enableProcessPage() def disableProcessPage(self): diff --git a/backend/src/UpscaleTorch.py b/backend/src/UpscaleTorch.py index 1ec9c114..2f2af912 100644 --- a/backend/src/UpscaleTorch.py +++ b/backend/src/UpscaleTorch.py @@ -227,7 +227,7 @@ def renderImage(self, image: torch.Tensor) -> torch.Tensor: @torch.inference_mode() def renderToNPArray(self, image: torch.Tensor) -> torch.Tensor: while self.model is None: - sleep(0) + sleep(1) if self.tilesize == 0: output = self.renderImage(image) else: diff --git a/src/ui/ProcessTab.py b/src/ui/ProcessTab.py index 7f715f25..43c5d450 100644 --- a/src/ui/ProcessTab.py +++ b/src/ui/ProcessTab.py @@ -345,6 +345,10 @@ def renderToPipeThread(self, method: str, backend: str, interpolateTimes: int): log(str(textOutput)) self.renderProcess.wait() # done with render + # Have to swap the visibility of these here otherwise crash for some reason + self.parent.pauseRenderButton.setVisible(False) + self.parent.startRenderButton.setVisible(True) + self.parent.startRenderButton.setEnabled(True) self.parent.onRenderCompletion() def getRoundedPixmap(self, pixmap, corner_radius):