FlashVideo icon indicating copy to clipboard operation
FlashVideo copied to clipboard

Spatial and temporal slice....more info

Open sirPhoebus opened this issue 1 year ago • 1 comments

"For GPUs with less memory, one might consider increasing the [spatial and temporal slice]"

Can you please elaborate a bit on that matter ? For ex on a 4090, what settings should be tweaked ?

Thanks and congrats for this idea/concept of txt2vid !!

sirPhoebus avatar Feb 16 '25 08:02 sirPhoebus

Thank you for your recognition of our work!

The memory usage optimization strategies in VAE decoders primarily revolve [spatial and temporal slice] operations. Notably, spatial slicing can be enhanced by increasing the variables num_h_splits and num_w_splits as shown in the referenced line of code. Temporal slicing can be improved by expanding splits_x = torch.split(x, [9, 8, 8, 8, 8], dim=2), as introduced in this utility. However, these optimizations primarily conserve memory within the VAE decoder itself.

For 4090, it may only support stage-1 execution of FlashVideo. Working with 1080P sequences in Stage-2 can be difficult. We might consider additional sequence optimizations within DIT (for loop attention head) to further save memory.

jshilong avatar Feb 16 '25 15:02 jshilong