Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If CFG Uses Parallel Computation, Does Acceleration Become Impossible? #17

Open
zishen-ucap opened this issue Feb 12, 2025 · 0 comments

Comments

@zishen-ucap
Copy link

zishen-ucap commented Feb 12, 2025

The general idea of CFG-Cache is to use the residual of the latent conditioned and unconditioned at time t to be equivalent to the residual of the latent conditioned and unconditioned at time t-1, thus solving for the residual of the unconditioned latent at time t-1, while separately calculating high-frequency and low-frequency information. However, in most algorithms using CFG, conditioned and unconditioned latents are processed in parallel, meaning they are concatenated together in the batch for computation.

My question is, if there is enough GPU memory and parallel computation is used, does the acceleration from CFG-Cache essentially disappear? Is this acceleration only effective when conditioned and unconditioned are processed sequentially? If parallel computation can still accelerate, could you explain why this is the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant