Nightmare-n / DepthAnyVideo

Depth Any Video with Scalable Synthetic Data
https://depthanyvideo.github.io
Apache License 2.0
413 stars 27 forks source link

torch.OutOfMemoryError: CUDA out of memory ? #9

Closed juntaosun closed 1 month ago

juntaosun commented 1 month ago
torch.OutOfMemoryError: CUDA out of memory. See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

After testing, the input video is only 10 seconds. As expected, the GPU memory crashed. The model is based on Stable Video Diffusion (SVD), which requires a very high computer configuration.

For video processing, at least 24GB~48GB VRAM is required. What is a good solution?

Nightmare-n commented 1 month ago

We recommend reducing the num_frames, num_interp_frames, max_resolution, and decode_chunk_size to decrease memory usage.

juntaosun commented 1 month ago

For cartoon images, depth doesn't seem to work?

{92F9A223-C0A1-4E18-91DD-1D0D5EE08CB5}

juntaosun commented 1 month ago

It is best to get rid of Stable Video Diffusion, which requires too much VRAM. The general computer configuration cannot run video inference.