fix issue with Styles when Hires prompt is used #15269
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
the tldr version is that
there are some issues when
Hires prompt
(different prompt for hres pass) andStyles
is use toughterthe infotext will distinguisher or parsed incorrectly
Current situation
the Hires prompt in infotext dose NOT includs applyed Styles
This causes it feels under certain situations when boath Styles and Hires prompts is used
the Styles will not be extracted and will be left in Prompt
but now this meant that this Hires prompt will not have Styles
but when reading infotext, as the style is match in Prompt, the Style will be extracted, now and so on generation the Style will be applyed to boad
Infer styles from prompts
/infotext_styles
is set toignore
, it will not be able to read infotext correctory as hires prompt dose not contain sylestldr: webui may not be able to retrive the original infotext when Styles and Hires prompt is used
fix solution
if version info is not found behavior would be enabled
after this PR new intotext should not have this issue anymore
when passing old infotext the behavior is not changed as new behavior is disabled
minor changes:
init()
create_infotext
hires prompt will be written to infotext if it is diffrent to promptsuggestion
shared.opts.add_version_to_infotext
mandatorycreate_infotext
so that so that it's easier to add "index generation parameters" (such as seed or prompts) in a way that it doesn't require adding additional input argumentsthis would benefit extensions
note: in this PR description I only mentioned prompt and hires prompt, the same logic is also applied to ther negative counterpart.
Checklist: