Doubiiu / DynamiCrafter

[ECCV 2024, Oral] DynamiCrafter: Animating Open-domain Images with Video Diffusion Priors
https://doubiiu.github.io/projects/DynamiCrafter/
Apache License 2.0
2.46k stars 197 forks source link

"perframe_ae" was not specified when calling with resolution 512 from gradio_app.py #18

Closed ngc-shj closed 7 months ago

ngc-shj commented 8 months ago

Great work!

When I checked the code in run.sh and run_mp.sh, the "perframe_ae" option was specified when the resolution was other than 256, i.e. 512 and 1024. However, "perframe_ae" is not set at resolution 512 because only the values from the config file are applied when invoking from gradio_app.py.

I think adding "perframe_ae: True" to inference_512_v1.0.yaml is a good idea. What do you think?

Doubiiu commented 8 months ago

yes. i was aware of this when releasing code. But actually perframe_ae=True won't bring any benefits for DynamiCrafter512 model in terms of saving GPU memory based on my own attempt. Sure you can add that in the config.

ngc-shj commented 8 months ago

Thank you for you replying.

In my environment, RTX 4090 24GB, CPU offload occurred in DynamiCrafter512 model. Immediately after starting gradio_app.py, 12.8GB of VRAM was used, and after that, memory was used up to 37.2GB (vram 23.6 + mem 13.6). Setting perframe_ae=True did not use more than 12.8GB of VRAM. The time required to generate a video has also been reduced from 120.51 seconds to 53.26 seconds.

Doubiiu commented 8 months ago

wow Thanks! I will add that into the config of 512 model.

ngc-shj commented 8 months ago

FYI. For, RTX 4090 Laptop GPU (16GB)

Doubiiu commented 8 months ago

Thanks for your contribution!🙏 @ngc-shj

rajatanand86 commented 1 month ago

where to add this ? perframe_ae=True