fix: gpu memory leaks
This commit is contained in:
parent
3a47920186
commit
593611cdb7
13 changed files with 420 additions and 166 deletions
|
|
@ -63,6 +63,10 @@ class YOLOv8Utils:
|
|||
# Normalize to [0, 1] (YOLOv8 expects normalized input)
|
||||
frame_normalized = frame_resized / 255.0
|
||||
|
||||
# NOTE: Don't track these tensors - they're short-lived inputs to TensorRT
|
||||
# that get automatically freed by PyTorch after inference completes.
|
||||
# Tracking them would show false "leaks" since we can't track when TensorRT consumes them.
|
||||
|
||||
return frame_normalized
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue