fix(metadata): recall z_image_shift correctly#9139
Open
Pfannkuchensack wants to merge 3 commits into
Open
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.
lstein
requested changes
May 14, 2026
Collaborator
lstein
left a comment
There was a problem hiding this comment.
Everything works except for the very last suggested test step. When I generate a z-image with shift auto, the shift parameter does not appear in the metadata as expected. It does appear when I select a custom shift.
The backend's CoreMetadataInvocation uses model_dump(exclude_none=True), so passing null/undefined for z_image_shift drops the field from the saved metadata entirely. As a result, an image generated with auto shift had no shift entry in its metadata viewer. Write the literal 'auto' as a sentinel when shift is null so the field survives serialization, and teach the parser to map it back to null on recall. Also wire the ZImageShift handler into the Recall Parameters tab (it was defined but never rendered).
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)