fix infotext Lora hashes fro hires fix different lora #16062
Merged
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
there exist a minor flaw with infotext
Lora hashes
currently the
Lora hashes
written to the infotext will be theLora hashes
of the "last last activated lores"normally this works perfectly fine
the issue occurs when the using hires fix
as hires fix allows diffrent prompt which means the user can change the lora
if the uses removs some loras that are in the first pass then the
Lora hashes
infotext will not have the loras of the first pass obviouslythis PR makes changes so it saves the lora hashes in saved in a dict under
p.lora_hashes
when on first pass the dict will be set to empty
{}
but
is_hr_pass
it will use the use the existingp.lora_hashes
and add any new hashes to the dicttested with the hires fix button and all seems to work fine
also compacted the code
TI hashes
also have similar issues but and moreworse possibly due to where the code is it doesn't even write to infotext consistently
currently I not sure how to fix that, maybe someone who have an idea
Checklist: