fix(metadata): recall z_image_shift correctly#9139
Open
Pfannkuchensack wants to merge 1 commit intoinvoke-ai:mainfrom
Open
fix(metadata): recall z_image_shift correctly#9139Pfannkuchensack wants to merge 1 commit intoinvoke-ai:mainfrom
Pfannkuchensack wants to merge 1 commit intoinvoke-ai:mainfrom
Conversation
Widen the validator range to match the param's actual max (10) so saved shift values above 3 are recalled, and handle absent/null values by recalling as auto (null) when the recalled image is a Z-Image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Widen the validator range to match the param's actual max (10) so saved shift values above 3 are recalled, and handle absent/null values by recalling as auto (null) when the recalled image is a Z-Image.
Previously the parser used
z.number().min(0).max(3), which silently rejected any saved shift value greater than 3 (the slider goes up to 7, the number input up to 10). It also had no path for older Z-Image images that don't includez_image_shiftin their metadata, so "Use All" left the current shift untouched instead of resetting to auto.The handler now:
0..10to matchParamZImageShift'snumberInputMax,nullwhen the key isnullor absent and the active base isz-image(checked viaselectBase, which is reliable becauseMainModelis sorted to recall first),Related Issues / Discussions
Closes #9135
QA Instructions
z_image_shiftwas added to metadata) → Use All. Expected: shift recalls to auto.Auto(was previously empty/undefined).Merge Plan
Standard merge — no schema or migration impact, redux slice shape is unchanged (
zImageShift: number | nullalready supportsnull).Checklist
What's Newcopy (if doing a release after this PR)