ComfyUI-CogVideoXWrapper icon indicating copy to clipboard operation
ComfyUI-CogVideoXWrapper copied to clipboard

Is it possible to reduce VRAM usage during VAE encode?

Open wailovet opened this issue 1 year ago • 4 comments

When there is only 16G VRAM, an OOM error occurs in the VAE encoding stage when using a resolution of 1024.

wailovet avatar Sep 21 '24 15:09 wailovet

Yes, use the tiled vae option. Smaller the tiles, less memory it uses.

kijai avatar Sep 21 '24 15:09 kijai

The current VAE encode seems not to implement the tiled vae option.

wailovet avatar Sep 21 '24 16:09 wailovet

The current VAE encode seems not to implement the tiled vae option.

Oh sorry I read it as decode... I actually tried enabling tiling for encoding but it didn't change anything, will need to investigate more. I'm barely able to fit 1024 with 24GB myself.

kijai avatar Sep 21 '24 16:09 kijai

I tried of https://github.com/MinusZoneAI/ComfyUI-CogVideoX-MZ/blob/main/mz_enable_vae_encode_tiling.py, but it still seems to run OOM when enable_sequential_cpu_offload is enabled. It would be even better if it could be implemented in ComfyUI-CogVideoXWrapper.

wailovet avatar Sep 23 '24 17:09 wailovet

Tiling is option now.

kijai avatar Nov 19 '24 17:11 kijai