Skip to content

feat: add configurable shift parameter for Z-Image#9004

Open
Pfannkuchensack wants to merge 6 commits intoinvoke-ai:mainfrom
Pfannkuchensack:feat/zimage_add_shift_value
Open

feat: add configurable shift parameter for Z-Image#9004
Pfannkuchensack wants to merge 6 commits intoinvoke-ai:mainfrom
Pfannkuchensack:feat/zimage_add_shift_value

Conversation

@Pfannkuchensack
Copy link
Copy Markdown
Collaborator

Summary

Add a configurable shift (mu) parameter for Z-Image models to override the automatic sigma schedule calculation.

Backend:

  • Added optional shift field to ZImageDenoiseInvocation (default: None = auto-calculate from image dimensions)
  • Bumped invocation version to 1.5.0

Frontend:

  • New ParamZImageShift component with slider (1–7) and number input (0–10)
  • Shows "Shift (auto)" when unset, inline X button to reset from manual back to auto
  • Wired through Redux state (zImageShift) and graph builder

QA Instructions

  1. Select a Z-Image model
  2. Open Advanced Options — Shift should appear below CFG Scale
  3. Default state: label shows "Shift (auto)", slider at 3
  4. Move slider or type a value — label changes to "Shift ✕"
  5. Click the ✕ — resets back to "Shift (auto)"
  6. Generate with auto shift — should produce same results as before
  7. Generate with manual shift override — sigma schedule should change accordingly

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

Add a shift (mu) override to the Z-Image denoise invocation and expose
it in the UI. When left blank, shift is auto-calculated from image
dimensions (existing behavior). Users can override to fine-tune the
timestep schedule, with an inline X button to reset back to auto.
@github-actions github-actions bot added python PRs that change python files invocations PRs that change invocations frontend PRs that change frontend files labels Mar 28, 2026
Pfannkuchensack and others added 3 commits April 2, 2026 22:18
…me shift

Use shift directly as a linear multiplier instead of exp(mu), giving
more predictable and uniform control over the timestep schedule.
Auto-calculated values are converted via exp(mu) to preserve identical
default behavior.
Copy link
Copy Markdown
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to work as advertised. However, the shift isn't included in the recall parameters.

@lstein lstein self-assigned this Apr 7, 2026
@lstein lstein added the v6.13.x label Apr 7, 2026
@lstein lstein moved this to 6.13.x Theme: MODELS in Invoke - Community Roadmap Apr 7, 2026
Pfannkuchensack and others added 2 commits April 7, 2026 15:30
Write z_image_shift into graph metadata and add a ZImageShift recall
handler so the shift override can be restored from previously generated
images. Auto-mode (null) is omitted from metadata to avoid persisting a
stale value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files invocations PRs that change invocations python PRs that change python files v6.13.x

Projects

Status: 6.13.x Theme: MODELS

Development

Successfully merging this pull request may close these issues.

2 participants