Skip to content

resolve LoCon/LoHA/LyCORIS poblem#18

Open
a2569875 wants to merge 1 commit into
opparco:mainfrom
a2569875:original
Open

resolve LoCon/LoHA/LyCORIS poblem#18
a2569875 wants to merge 1 commit into
opparco:mainfrom
a2569875:original

Conversation

@a2569875

Copy link
Copy Markdown

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