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

resolve LoCon/LoHA/LyCORIS poblem #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a2569875
Copy link

Hello:

I found that errors occur (IndexError: list index out of range) when using both a LoRA model and a LoCon/LoHA/LyCORIS model simultaneously, and there are also issues with incomplete model loading when using the LoCon/LoHA/LyCORIS model.

This is because you used "_11_1_proj_out" and "_11_mlp_fc2" to determine if it's the last layer of the model, but the LoCon model happens to not have the "_11_1_proj_out" and "_11_mlp_fc2" layer. As a result, your "text_model_encoder_counter" and "diffusion_model_counter" counter will calculate incorrectly, leading to a failed model loading.

Therefore, this pull request starts by checking whether there has been "_11_1_proj_out" and "_11_mlp_fc2" at the beginning of each loop to determine if the model is a LoCon/LoHA/LyCORIS model. If it is, then it will correct the calculation of your "text_model_encoder_counter" and "diffusion_model_counter" counter to solve the problem.

Another issue is that when both sub-promote blocks use the same LoRA, there is a problem of duplicate accumulation of the LoRA weight. I have also made corrections, please review and thank you.

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

Successfully merging this pull request may close these issues.

1 participant