kijai / ComfyUI-CogVideoXWrapper

980 stars 59 forks source link

can CPU_offload use more vram? #273

Open pondloso opened 1 day ago

pondloso commented 1 day ago

with cog 1.5 t can make high res and it look good but my 16gb vram not enough .

with CPU_off load result came out fine but it take like 24-25 min for 49 frame,and vram is use around 7-8 GB. can we increasing vram use in CPU_off load mode to make it faster? or it just doesn't matter it will take time same with 7-8 GB vram use?

zazoum-art commented 1 day ago

I don't know how vram can be added, but in the case of off-load with the same vram AND dramatically less time spent, one can test dividing the number of frames produced in the sampler and even inside comfyUI add an interpolation node picked from comfyUI-manager nodes (even kijai has two of them) before that VideoCombine. That is saving a lot of time for sampler and adding the time from the interpolation. I haven't tested it throughout with all the interpolation nodes that exist for comfyUI so to see what the exact numbers are in time spent or if the result is of the same quality, but so far I can tell that it saves time waiting for the result.

pondloso commented 1 day ago

did you mean put more frame into " latent frames"? "Sampling 53 frames in 13 latent frames" I just wonder if you mean about this?

I kind of understand what you mean but i'm too dump for figured out how to do.

zazoum-art commented 1 day ago

num_frames Just doing some tests now in low number of frames such as 49, to see if the interpolation is noticable. What resolution do you use, to make sure I check the same thing?

pondloso commented 1 day ago

I test with 1520*865 it came out fine but take like 24 min.

zazoum-art commented 1 day ago

OK, instead of 49 num_frames, I tested 25, and I video-interpolated by x2. Result returns same length and seems good in both ways. About, 9 minutes less wait time for it to process comparing: Offload 49 num_frames and Offload 25 num_frames with VFI. A bit of interpolation noticable. 8GB.

pondloso commented 1 day ago

did you mean make a 25 frame one than *2 frame with VFI? thank you for your idea.

zazoum-art commented 1 day ago

yep. Im making now an intense motion video with 25 num_frames to test how far interpolation goes on multiplier, before the result looks bad.