Fix the bug that retains effects of a previous model when switching models during LoRA use. #13917
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fix addresses the issue where switching models during the use of LoRA would cause the influence of the original model to affect the subsequent one. This problem has been reported as several issues, but it remains unresolved due to problems such as non-reproducibility. As discussed in the issues, the impact given during the model switch is very minor, and if the part has the same weight in both the pre- and post-switch models, the generated image does not change and cannot be reproduced.
issues
#13516
#12619
#12872
There may also be reports of this as a separate issue.
Checklist: