DynamiCrafter icon indicating copy to clipboard operation
DynamiCrafter copied to clipboard

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

Open ngc-shj opened this issue 1 year ago • 5 comments

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?

ngc-shj avatar Feb 06 '24 14:02 ngc-shj

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.

Doubiiu avatar Feb 07 '24 01:02 Doubiiu

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.

ngc-shj avatar Feb 07 '24 01:02 ngc-shj

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

Doubiiu avatar Feb 07 '24 02:02 Doubiiu

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

  • 1024 model: CUDA OOM occurred
  • 512 model: 12.6GB、102.69 sec perframe_ae: True
  • 256 model: 11.8GB、46.48 sec perframe_ae: True

ngc-shj avatar Feb 07 '24 05:02 ngc-shj

Thanks for your contribution!🙏 @ngc-shj

Doubiiu avatar Feb 07 '24 05:02 Doubiiu