Skip to content

Does this require nvidia gpu? #101

@Katsuyamaki

Description

@Katsuyamaki

I didn't see the req on the github main page. Im getting a cuda error.

/Video-Depth-Anything main* 14s
venv ❯ python3 run.py --input_video ./assets/example_videos/davis_rollercoaster.mp4 --output_dir ./outputs --encoder vitl
  0%|                                                                                      | 0/4 [00:02<?, ?it/s]
Traceback (most recent call last):
  File "/home/katsuya/Video-Depth-Anything/run.py", line 57, in <module>
    depths, fps = video_depth_anything.infer_video_depth(frames, target_fps, input_size=args.input_size, device=DEVICE, fp32=args.fp32)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/video_depth.py", line 109, in infer_video_depth
    depth = self.forward(cur_input) # depth shape: [1, T, H, W]
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/video_depth.py", line 64, in forward
    features = self.pretrained.get_intermediate_layers(x.flatten(0,1), self.intermediate_layer_idx[self.encoder], return_class_token=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/dinov2.py", line 308, in get_intermediate_layers
    outputs = self._get_intermediate_layers_not_chunked(x, n)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/dinov2.py", line 277, in _get_intermediate_layers_not_chunked
    x = blk(x)
        ^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/dinov2_layers/block.py", line 247, in forward
    return super().forward(x_or_x_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/dinov2_layers/block.py", line 105, in forward
    x = x + attn_residual_func(x)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/dinov2_layers/block.py", line 84, in attn_residual_func
    return self.ls1(self.attn(self.norm1(x)))
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/video_depth_anything/dinov2_layers/attention.py", line 76, in forward
    x = memory_efficient_attention(q, k, v, attn_bias=attn_bias)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/xformers/ops/fmha/__init__.py", line 223, in memory_efficient_attention
    return _memory_efficient_attention(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/xformers/ops/fmha/__init__.py", line 321, in _memory_efficient_attention
    return _memory_efficient_attention_forward(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/xformers/ops/fmha/__init__.py", line 337, in _memory_efficient_attention_forward
    op = _dispatch_fw(inp, False)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/xformers/ops/fmha/dispatch.py", line 120, in _dispatch_fw
    return _run_priority_list(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/katsuya/Video-Depth-Anything/venv/lib/python3.11/site-packages/xformers/ops/fmha/dispatch.py", line 63, in _run_priority_list
    raise NotImplementedError(msg)
NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs:
     query       : shape=(32, 2443, 16, 64) (torch.bfloat16)
     key         : shape=(32, 2443, 16, 64) (torch.bfloat16)
     value       : shape=(32, 2443, 16, 64) (torch.bfloat16)
     attn_bias   : <class 'NoneType'>
     p           : 0.0
`decoderF` is not supported because:
    device=cpu (supported: {'cuda'})
    attn_bias type is <class 'NoneType'>
    bf16 is only supported on A100+ GPUs
`flshattF@v2.3.6` is not supported because:
    device=cpu (supported: {'cuda'})
    bf16 is only supported on A100+ GPUs
`tritonflashattF` is not supported because:
    device=cpu (supported: {'cuda'})
    bf16 is only supported on A100+ GPUs
    operator wasn't built - see `python -m xformers.info` for more info
    triton is not available
`cutlassF` is not supported because:
    device=cpu (supported: {'cuda'})
    bf16 is only supported on A100+ GPUs
`smallkF` is not supported because:
    max(query.shape[-1] != value.shape[-1]) > 32
    device=cpu (supported: {'cuda'})
    dtype=torch.bfloat16 (supported: {torch.float32})
    bf16 is only supported on A100+ GPUs
    unsupported embed per head: 64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions