Skip to content

Commit

Permalink
add dynamic and ensemble in gui
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise committed Dec 14, 2024
1 parent 8583bce commit 86595d0
Show file tree
Hide file tree
Showing 3 changed files with 521 additions and 197 deletions.
4 changes: 3 additions & 1 deletion REAL-Video-Enhancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def updateVideoGUIDetails(self):
self.interpolationContainer.setVisible(
isInterpolate
)
self.sloMoModeContainer.setVisible(
self.interpolateContainer_2.setVisible(
isInterpolate
)
# set interpolation container visible if interpolate model is not none
Expand Down Expand Up @@ -337,6 +337,8 @@ def startRender(self):
),
benchmarkMode=self.benchmarkModeCheckBox.isChecked(),
sloMoMode=self.sloMoModeCheckBox.isChecked(),
dyanmicScaleOpticalFlow=self.dynamicScaledOpticalFlowCheckBox.isChecked(),
ensemble=self.ensembleCheckBox.isChecked(),
)

def disableProcessPage(self):
Expand Down
14 changes: 13 additions & 1 deletion src/ui/ProcessTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def QConnect(self):
# set tile size visible to false by default
self.parent.tileSizeContainer.setVisible(False)
#set slo mo container visable to false by default
self.parent.sloMoModeContainer.setVisible(False)
self.parent.interpolateContainer_2.setVisible(False)
# connect up tilesize container visiable
self.parent.tilingCheckBox.stateChanged.connect(self.onTilingSwitch)

Expand Down Expand Up @@ -199,6 +199,8 @@ def run(
interpolateModel: str,
benchmarkMode: bool,
sloMoMode: bool,
dyanmicScaleOpticalFlow: bool,
ensemble: bool,
):
interpolateModels, upscaleModels = self.getModels(backend)
if interpolateModel == "None":
Expand All @@ -225,6 +227,8 @@ def run(
"""
self.benchmarkMode = benchmarkMode
self.sloMoMode = sloMoMode
self.dyanmicScaleOpticalFlow = dyanmicScaleOpticalFlow
self.ensemble = ensemble
# get model attributes

if interpolateModel:
Expand Down Expand Up @@ -362,6 +366,14 @@ def renderToPipeThread(
command += [
"--slomo_mode",
]
if self.dyanmicScaleOpticalFlow:
command += [
"--dynamic_scaled_optical_flow",
]
if self.ensemble:
command += [
"--ensemble",
]

if self.settings["preview_enabled"] == "True":
command += [
Expand Down
Loading

0 comments on commit 86595d0

Please sign in to comment.