Skip to content

RuntimeError: input tensor must fit into 32-bit index math #30

@OHLIA

Description

@OHLIA
(StereoCrafter) root@7d0ec04d03ad:/StereoCrafter#  python depth_splatting_inference.py     --pre_trained_path ./weights/stable-video-diffusion-img2vid-xt-1-1     --unet_path ./weights/DepthCrafter     --input_video_path ./inputs/sample.mp4     --output_video_path ./outputs/sample_splatting_results.mp4
/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/Forward_Warp-0.0.1-py3.8.egg/Forward_Warp/forward_warp.py:19: SyntaxWarning: "is" with a literal. Did you mean "=="?
/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/Forward_Warp-0.0.1-py3.8.egg/Forward_Warp/forward_warp.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/Forward_Warp-0.0.1-py3.8.egg/Forward_Warp/forward_warp.py:58: SyntaxWarning: "is" with a literal. Did you mean "=="?
/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/Forward_Warp-0.0.1-py3.8.egg/Forward_Warp/forward_warp.py:19: SyntaxWarning: "is" with a literal. Did you mean "=="?
/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/Forward_Warp-0.0.1-py3.8.egg/Forward_Warp/forward_warp.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/Forward_Warp-0.0.1-py3.8.egg/Forward_Warp/forward_warp.py:58: SyntaxWarning: "is" with a literal. Did you mean "=="?
Loading pipeline components...: 100%|█████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 16.90it/s]
==> processing video:  ./inputs/sample.mp4
==> original video shape:  (1416, 960, 1920, 3)
==> downsampled shape: (1416, 512, 1024, 3), with stride: 1
==> final processing shape: (1416, 512, 1024, 3)
Traceback (most recent call last):
  File "depth_splatting_inference.py", line 305, in <module>
    Fire(main)
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "depth_splatting_inference.py", line 287, in main
    video_depth, depth_vis = depthcrafter_demo.infer(
  File "depth_splatting_inference.py", line 123, in infer
    res = self.pipe(
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/StereoCrafter/dependency/DepthCrafter/depthcrafter/depth_crafter_ppl.py", line 162, in __call__
    video_embeddings = self.encode_video(
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/StereoCrafter/dependency/DepthCrafter/depthcrafter/depth_crafter_ppl.py", line 32, in encode_video
    video_224 = _resize_with_antialiasing(video.float(), (224, 224))
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py", line 645, in _resize_with_antialiasing
    input = _gaussian_blur2d(input, ks, sigmas)
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py", line 723, in _gaussian_blur2d
    out_x = _filter2d(input, kernel_x[..., None, :])
  File "/opt/conda/envs/StereoCrafter/lib/python3.8/site-packages/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py", line 684, in _filter2d
    input = torch.nn.functional.pad(input, padding_shape, mode="reflect")
RuntimeError: input tensor must fit into 32-bit index math

原本视频样本分辨率为3840x1920,会报错。我改为1920x960之后,仍然同样的错误。请问我需要如何修改?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions