kijai / ComfyUI-CogVideoXWrapper

981 stars 59 forks source link

Hello, Kijai, what's the meaning of "hf_step" and "lf_step" of fastercache node? #247

Open dummyapps opened 3 days ago

dummyapps commented 3 days ago

Fastercache is really useful, it can speed up 2x when work with cogvideox 1.5, really appreciate for your great work.

but I can find information about this node, what's the meaning of "hf_step" and "lf_step" of fastercache node? and what's the recommended value of them?

and are there any other tricks to speed up and improve the video quality?

Thanks!

cheezecrisp commented 3 days ago

Did you notice that the results of Fastercache seem noisy

dummyapps commented 3 days ago

Did you notice that the results of Fastercache seem noisy

you can set the sample steps to 30, the quality is pretty good. I set the start step of fatercache to 5 and set the sample steps to 30, both speed and quality are taken into account, and the image consistency is much better

cheezecrisp commented 3 days ago

Did you notice that the results of Fastercache seem noisy

you can set the sample steps to 30, the quality is pretty good. I set the start step of fatercache to 5 and set the sample steps to 30, both speed and quality are taken into account, and the image consistency is much better

Did you mean to say that set steps to 30, fatercache start step to 5, while fatercache hf_step and lf_step keep 30 and 40? If that's so, I don't think the fastercache work because all the steps in it need to be less than total steps

kijai commented 3 days ago

I don't really know myself what the optimal settings are, probably situational, based on the original example for 50 steps (the default values in the node too) and looking at their graph it would align to something like this:

Discord_QzLKHdNBoW

You do indeed need to fit the steps within the sampling process.

Another thing I noticed is that results are far better with DDIM than DPM when using FasterCache.

kijai commented 3 days ago

CogVideoXDPM

https://github.com/user-attachments/assets/fed4e224-0f7a-45a0-9992-c1975770a2bb

CogVideoXDDIM

https://github.com/user-attachments/assets/1e277eb7-3b04-4bd7-9611-0d4dd554b9db

Some quality hit is pretty much unavoidable of course.

dummyapps commented 3 days ago

Did you notice that the results of Fastercache seem noisy

you can set the sample steps to 30, the quality is pretty good. I set the start step of fatercache to 5 and set the sample steps to 30, both speed and quality are taken into account, and the image consistency is much better

Did you mean to say that set steps to 30, fatercache start step to 5, while fatercache hf_step and lf_step keep 30 and 40? If that's so, I don't think the fastercache work because all the steps in it need to be less than total steps

I guess faterchae start step means which sample step to trigger faster cache, you can see the speed is much faster when reach the sample step. I don't know hf_step and lf_step means, when I set sample steps to 20, there is so much noisy in output video, but if I set steps to 30, the noisy is gone.

dummyapps commented 3 days ago

Kigali, thanks for your reply, I mainly use the workflow to animate humans, my settings is best for my 4060ti 16g, my requirement are "the face and body is consistent, no weird motion, the speed is fast", it seems that it is quite fit my needs.

https://github.com/user-attachments/assets/3a40b14c-5a35-4c3b-8aaa-9839cab0be2a

test

dummyapps commented 3 days ago

Another thing I noticed is that results are far better with DDIM than DPM when using FasterCache.

According to my test, it seems that cogvideoxdpmscheduler is the best for human.