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

how to do Identity Mixing? #5

Open
loboere opened this issue Apr 21, 2024 · 11 comments
Open

how to do Identity Mixing? #5

loboere opened this issue Apr 21, 2024 · 11 comments

Comments

@loboere
Copy link

loboere commented Apr 21, 2024

No description provided.

@jshilong
Copy link
Contributor

This code does not implement Identity Mixing. You can implement it by combining two ID results on

x = x + (self.self_attn.self_attn_first(
and
x = x + (self.self_attn.self_attn_first(

@loboere
Copy link
Author

loboere commented Apr 21, 2024

I would implement it but I don't understand what part of the code represents the id

@jshilong
Copy link
Contributor

jshilong commented Apr 22, 2024

I would implement it but I don't understand what part of the code represents the id

Thank you very much for your interest in our work. To understand the meaning of these tensors, you may need to set a breakpoint and refer to the article. The ID information is encoded in "ctx". If you want to mix the IDs, you should first obtain "ctx_id1" and "ctx_id2". Then, you can calculate "x" using the following formula:

x = x + (self.self_attn.self_attn_first(y, ctx_id1)) * self.share_cache['similarity'] + (1 - self.share_cache['similarity']) * self.self_attn.self_attn_first(y, ctx_id2)

if you encounter any difficulties, please don't hesitate to ask me for help.

@loboere
Copy link
Author

loboere commented Apr 22, 2024

I don't understand how to load two IDs, ctx was generated from y and y from x, I don't know what x is, could you give me some code to load two IDs?

@loboere
Copy link
Author

loboere commented May 4, 2024

Do you plan to publish the code for Identity Mixing?

@jshilong
Copy link
Contributor

jshilong commented May 5, 2024

Do you plan to publish the code for Identity Mixing?

Absolutely, this would be a modification to the existing code. I will add this function soon.

@loboere
Copy link
Author

loboere commented Jun 11, 2024

It's been a while, please add it as soon as possible

@loboere
Copy link
Author

loboere commented Jul 3, 2024

any news?

@zimenglan-sysu-512
Copy link

+1

@loboere
Copy link
Author

loboere commented Jul 21, 2024

please @jshilong add it as soon as possible

@loboere
Copy link
Author

loboere commented Oct 5, 2024

any news @jshilong

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

3 participants