Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU memory requirement for inference #4

Open
caoandong opened this issue Jul 29, 2024 · 4 comments
Open

GPU memory requirement for inference #4

caoandong opened this issue Jul 29, 2024 · 4 comments

Comments

@caoandong
Copy link

Hi, thank you so much for open sourcing this amazing work!

I'm wondering what's the memory requirement to run the inference script? I tested the script verbatim on an A100 40G machine and it went OOM. Curious if we need to use a 80G machine instead, or is there something obvious that I'm missing?

Thanks!

@JC1DA
Copy link

JC1DA commented Jul 29, 2024

it requires more than 40GB for 2 seconds of 720p video in my early experiments, 3 seconds video needs ~71 GB Vram without upscaling (upscale = 1)

Another question is "can we use something like flash attention to reduce vram usage"?

@hejingwenhejingwen
Copy link
Collaborator

Hi, thank you so much for open sourcing this amazing work!

I'm wondering what's the memory requirement to run the inference script? I tested the script verbatim on an A100 40G machine and it went OOM. Curious if we need to use a 80G machine instead, or is there something obvious that I'm missing?

Thanks!

At this time, A100 80G machine is required for high-resolution (~2k) and high-frame-rate (fps>=24) video generation. You can decline "up_scale" or "target_fps" to avoid OOM, but the visual results will observe obvious drop.

@hejingwenhejingwen
Copy link
Collaborator

it requires more than 40GB for 2 seconds of 720p video in my early experiments, 3 seconds video needs ~71 GB Vram without upscaling (upscale = 1)

Another question is "can we use something like flash attention to reduce vram usage"?

You are correct, this algorithm is expensive. Actually, we have already incorporated xformers for attention computation.
You can modify the number of sampling steps to achieve faster inference, but the performance will drop undoubtedly. We will design more efficient sampling strategies in the future.

@O-O1024
Copy link

O-O1024 commented Jul 29, 2024

2 秒的 720p 视频用了多长时间推理? @JC1DA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants