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

question about kv_cache #196

Open
hrz2000 opened this issue Jan 20, 2025 · 1 comment
Open

question about kv_cache #196

hrz2000 opened this issue Jan 20, 2025 · 1 comment

Comments

@hrz2000
Copy link

hrz2000 commented Jan 20, 2025

return self.key_cache[layer_idx], self.value_cache[layer_idx]

Why are timestep and image_latents (collectively referred to as x) not kept during recording kv_cache, but only condition c? This makes the first time step of inference not perform self-attention of x on x, but only cross-attention of x on c.

@staoxiao
Copy link
Contributor

Hi, @hrz2000 , thank you for pointing out this issue. It appears to be a bug in the inference process, and I will carefully check this part of the code later.

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

2 participants