diff --git a/sexp_effects/primitive_libs/streaming_gpu.py b/sexp_effects/primitive_libs/streaming_gpu.py index 8760a6d..45f5fde 100644 --- a/sexp_effects/primitive_libs/streaming_gpu.py +++ b/sexp_effects/primitive_libs/streaming_gpu.py @@ -332,10 +332,11 @@ class GPUVideoSource: # Convert to CuPy via DLPack (zero-copy GPU transfer) if GPU_AVAILABLE: - # decord tensors support DLPack for zero-copy conversion - # This keeps the frame on GPU without any CPU transfer + # decord tensors have .to_dlpack() which returns a PyCapsule + # that CuPy can consume for zero-copy GPU transfer try: - gpu_frame = cp.from_dlpack(frame_tensor) + dlpack_capsule = frame_tensor.to_dlpack() + gpu_frame = cp.from_dlpack(dlpack_capsule) # Log success once per source if not getattr(self, '_dlpack_logged', False): print(f"[GPUVideoSource] DLPack zero-copy SUCCESS - frames stay on GPU", file=sys.stderr)