Error message on completing depth estimation with Video Depth Anything (Onnx)
I get an error message on completion of creating a depth map with Video depth Anything (Onnx). The map completes successfully, and can be used successfully when rendering a 3D video, but here is the error.
[E:onnxruntime:, sequential_executor.cc:572 onnxruntime::ExecuteKernel] Non-zero status code returned while running Reshape node. Name:'/inner/head/motion_modules.0/temporal_transformer/Reshape' Status Message: E:_work\1\s\onnxruntime\core/providers/cpu/tensor/reshape_helper.h:47 onnxruntime::ReshapeHelper::ReshapeHelper input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1,2,1024,20,36}, requested shape:{8,1024,20,36}
I got this error with 3.5 and 3.6.2
Noted, thanks for bringing this to my attention. This happens when the batch process reaches the end of the video. For example, if the batch size is set to 8 and the total frame count doesn’t divide evenly (like 270 frames), the final batch might have only 2 frames left. The model still tries to process a full batch of 8, but since there aren’t enough frames, the reshape node throws a runtime error. I’ll add a condition to handle incomplete batches at the end of processing so this doesn’t appear again.