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

About the training parameters of Spatial Lora: Recursive ones? #38

Open
Kenneth-Wong opened this issue May 20, 2024 · 1 comment
Open

Comments

@Kenneth-Wong
Copy link

I found an interesting implementation in your codes: In Line 644-674 of MotionDirector_train.py, the spatial_lora is added for each video, it will lead to a result that the Linear layer of the LoraInjectedLayer will be recursively transformed into a LoraInjectedLayer. It will lead to a process like (if two videos are used for training):

$$ Linear_2[Linear_1(x) + (l_1^u l_1^d(x))] + l_2^u l_2^d [(Linear_1(x) + (l_1^u l_1^d(x)))] ... $$

What is the motivation? Can I only inject only one time? If the number of videos are 100, 1000, ..., won't it cause some problems?

Thanks.

@ruizhaocv
Copy link
Collaborator

Sorry for the late reply, I was busy on another project.
This is just a simple implementation for injecting one spatial LoRA for each video, and the multiple spatial LoRAs are in parallel. Since in our customization setting, there are a small number of reference videos, this implementation will not cause problems. Of course, you can implement a more efficient injection method to deal with a large number of videos.

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