fix missing infotext cased by conda cache #16677
Draft
+117
−13
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
fix: missing infotext cased by conda cache
some generation params such as TI hashes or Emphasis is added in sd_hijack / sd_hijack_clip
if conda are fetche from cache sd_hijack_clip will not be executed and it won't have a chance to to add generation params
fix: generation params will also be missing if webui is in non low-vram mode because the hijack.extra_generation_params was never read after calculate_hr_conds
in order to fix this the generation parameters from sd_hijack will also has to be cahched along with conda cache
unfortunately caching generation parameters is not straightforward as sd_hijack could be called multiple times and in some cases
later calles will modify or add to existing generation parameters essentially you can't really cache the resules as the rules are mixed (TI hashes are combined from positive and negative prompts)
but if we change the way the info is writternm by using callable, we can cache the callable for later use
in order to achive I implement a new class GenerationParametersList
when a infotext needs to be created in sd_hijack / sd_hijack_clip, instead of directly writing `to sd_hijack.extra_generation parameters create a GenerationParametersList or a custom
this class extracted and cached after cond is calcated and apply to StableDiffusionProcessing..extra_generation parameters when the cached is retrived
the should be minimum compatible issues
the only potential risk is if an extention would interact with extra_generation_params['TI hashes'] or extra_generation_params['Emphasis'], which is unlikey and I was not able to find any extenton that do so
in the enven that dose happen, in most case the worst case it it will just fallback to what it was like before, I implement interaction with the new GenerationParametersList with str types
another implementation but decide to no go with it
Checklist: