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 sample_sparse_structure #153

Open
kevinhuangxf opened this issue Jan 18, 2025 · 1 comment
Open

Question about sample_sparse_structure #153

kevinhuangxf opened this issue Jan 18, 2025 · 1 comment

Comments

@kevinhuangxf
Copy link

Thanks for the excellent work!

I have a question about the sample_sparse_structure function. If it samples difference size of coordinates from the image encoded latents, how can this operation be applied for multiple batch size during training ?

@JeffreyXiang
Copy link
Collaborator

Hi,
Batched attention with different sequence length can be efficiently handled with modern attention implementation like flash-attn and xformers. See the code here for more details.

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