Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise committed Dec 24, 2024
1 parent 2785102 commit 8187db8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions backend/src/RenderVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ def __init__(
self.getVideoProperties(inputFile)

printAndLog("Using backend: " + self.backend)

if interpolateModel:
self.setupInterpolate()
printAndLog("Using Interpolation Model: " + self.interpolateModel)

# upscale has to be called first to get the scale of the upscale model
if upscaleModel:
self.setupUpscale()

printAndLog("Using Upscaling Model: " + self.upscaleModel)

if interpolateModel:
self.setupInterpolate()

printAndLog("Using Interpolation Model: " + self.interpolateModel)

super().__init__(
inputFile=inputFile,
Expand Down
12 changes: 6 additions & 6 deletions backend/src/pytorch/InterpolateArchs/GMFSS/GMFSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
ensemble: bool = False,
width: int = 1920,
height: int = 1080,
trt=False,
trt=True,
dtype: torch.dtype = torch.float16,
device: torch.device = torch.device("cuda" if torch.cuda.is_available() else "cpu"),
):
Expand Down Expand Up @@ -71,22 +71,22 @@ def __init__(
if trt:
from ...TensorRTHandler import TorchTensorRTHandler
trtHandler = TorchTensorRTHandler(multi_precision_engine=False,trt_optimization_level=5)
trtHandler.build_engine(self.ifnet, dtype=dtype, device=device, example_inputs=self.rife_example_input(), trt_engine_path="IFNet.engine")
trtHandler.build_engine(self.feat_ext, dtype=dtype, device=device, example_inputs=self.img0_example_input(), trt_engine_path="Feat.engine")
trtHandler.build_engine(self.flownet, dtype=dtype, device=device, example_inputs=self.flownet_example_input(), trt_engine_path="Flownet.engine")
trtHandler.build_engine(self.fusionnet, dtype=dtype, device=device, example_inputs=self.flownet_example_input(), trt_engine_path="Flownet.engine")
#trtHandler.build_engine(self.ifnet, dtype=dtype, device=device, example_inputs=self.rife_example_input(), trt_engine_path="IFNet.engine")
#trtHandler.build_engine(self.feat_ext, dtype=dtype, device=device, example_inputs=self.img0_example_input(), trt_engine_path="Feat.engine")
#trtHandler.build_engine(self.fusionnet, dtype=dtype, device=device, example_inputs=self.flownet_example_input(), trt_engine_path="Flownet.engine")
self.ifnet = None
self.feat_ext = None
#self.fusionnet = None
#self.flownet = None
self.flownet = None
import gc
gc.collect()
torch.cuda.empty_cache()
torch.cuda.reset_max_memory_allocated()
torch.cuda.reset_max_memory_cached()
self.ifnet = trtHandler.load_engine("IFNet.engine")
self.feat_ext = trtHandler.load_engine("Feat.engine")
#self.flownet = trtHandler.load_engine("Flownet.engine")
self.flownet = trtHandler.load_engine("Flownet.engine")



Expand Down

0 comments on commit 8187db8

Please sign in to comment.