Skip to content

Commit

Permalink
3 channels
Browse files Browse the repository at this point in the history
  • Loading branch information
NevermindNilas committed Jun 16, 2024
1 parent d010ad9 commit 9b6610b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/unifiedInterpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,15 +890,15 @@ def handleModel(self):
self.stream.synchronize()

self.I0 = None
self.I1 = torch.zeros(6, 224, 224, device=self.device, dtype=self.dType)
self.I1 = torch.zeros(3, 224, 224, device=self.device, dtype=self.dType)

@torch.inference_mode()
def processFrame(self, frame):
return F.interpolate(frame.half() if self.half else frame.float(), size=(224, 224), mode="bilinear").contiguous().squeeze(0)

@torch.inference_mode()
def cacheFrame(self):
self.I0.copy_(self.I1, non_blocking=True)
self.I0.copy_(self.I1, non_blocking=True)

@torch.inference_mode()
def run(self, I0, I1):
Expand All @@ -913,7 +913,3 @@ def run(self, I0, I1):
self.context.execute_async_v3(stream_handle=self.stream.cuda_stream)
self.stream.synchronize()
return self.dummyOutput[0][0].item() > 0.93




0 comments on commit 9b6610b

Please sign in to comment.