Skip to content

Conversation

@Pfannkuchensack
Copy link
Collaborator

@Pfannkuchensack Pfannkuchensack commented Jan 3, 2026

Summary

Add a new "Denoise - Z-Image + Metadata" node (ZImageDenoiseMetaInvocation) that extends the Z-Image denoise node with metadata output for image recall functionality.

This follows the same pattern as existing denoise_latents_meta (SD1.5/SDXL) and flux_denoise_meta (FLUX) nodes.

Captured metadata:

  • width / height
  • steps
  • guidance (guidance_scale)
  • denoising_start / denoising_end
  • scheduler
  • model (transformer)
  • seed
  • loras (if applied)

Related Issues / Discussions

Enables metadata recall for Z-Image generated images, similar to existing support for SD1.5, SDXL, and FLUX models.

QA Instructions

  1. Create a workflow using the new "Denoise - Z-Image + Metadata" node
  2. Connect the metadata output to a "Save Image" node
  3. Generate an image
  4. Check that metadata is saved with the image (visible in image info panel)
  5. Verify all generation parameters are captured correctly

Merge Plan

Requires feature/zimage-scheduler-support #8705 branch to be merged first (base branch).

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)

Pfannkuchensack and others added 15 commits December 26, 2025 20:53
Add support for alternative diffusers Flow Matching schedulers:
- Euler (default, 1st order)
- Heun (2nd order, better quality, 2x slower)
- LCM (optimized for few steps)

Backend:
- Add schedulers.py with scheduler type definitions and class mapping
- Modify denoise.py to accept optional scheduler parameter
- Add scheduler InputField to flux_denoise invocation (v4.2.0)

Frontend:
- Add fluxScheduler to Redux state and paramsSlice
- Create ParamFluxScheduler component for Linear UI
- Add scheduler to buildFLUXGraph for generation
Add support for alternative diffusers Flow Matching schedulers for Z-Image:
- Euler (default) - 1st order, optimized for Z-Image-Turbo (8 steps)
- Heun (2nd order) - Better quality, 2x slower
- LCM - Optimized for few-step generation

Backend:
- Extend schedulers.py with Z-Image scheduler types and mapping
- Add scheduler InputField to z_image_denoise invocation (v1.3.0)
- Refactor denoising loop to support diffusers schedulers

Frontend:
- Add zImageScheduler to Redux state in paramsSlice
- Create ParamZImageScheduler component for Linear UI
- Add scheduler to buildZImageGraph for generation
LCM scheduler may have more internal timesteps than user-facing steps,
causing user_step to exceed total_steps. This resulted in progress
percentage > 1.0, which caused a pydantic validation error.

Fix: Only call step_callback when user_step <= total_steps.
…ount

Remove the initial step_callback at step=0 to match SD/SDXL behavior.
Previously Flux/Z-Image showed N+1 steps (step 0 + N denoising steps),
while SD/SDXL showed only N steps. Now all models display N steps
consistently in the server log.
- Handle LCM scheduler by using num_inference_steps instead of custom sigmas
- Fix progress bar to show user-facing steps instead of internal scheduler steps
- Pass scheduler parameter to Z-Image denoise node in graph builder
- Add model-aware metadata recall for Flux and Z-Image schedulers
Add ZImageDenoiseMetaInvocation that extends ZImageDenoiseInvocation
with metadata output for image recall. Captures generation parameters
including steps, guidance, scheduler, seed, model, and LoRAs.
@github-actions github-actions bot added python PRs that change python files invocations PRs that change invocations backend PRs that change backend files frontend PRs that change frontend files labels Jan 3, 2026
Copy link
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.

Metadata Storage and Recall

The metadata storage and recall is confirmed working as expected for the prompts, the model, scheduler, image dimensions, step count and guidance scale. I don't see a linear view setting for denoising start and end, so I wasn't sure how to test that.

I did run into a problem with ZImage recall of the Advanced settings, leading to a state in which the three advanced menus (VAE, Qwen3 Encoder, and Qwen3 Source) were simultaneously disabled. The steps to reproduce are as follows:

  1. Select a Z-Image Turbo model
  2. Under Advanced, disable Qwen3 Source and enable the VAE and Qwen3 Encoder popups
  3. Generate an image
  4. Now generate an image with Qwen3 Source set, and the VAE and encoder popups empty.
  5. Page back to the image generated in (3) and Push the "Remix" button.
    Result: All the Advanced popups are disabled and there does not seem to be an easy way to reset them.

Step Count Display
The user-facing step counts for the three ZImage schedulers are reporting the expected counts now - thanks. Also noticed that Heun is reporting N steps rather than 2N-1, which is a nice user feature. Possibly the code changes in the ZImage scheduled PR leaked into this one?

However, the Flux counts are still N+1 for Euler and LCM. (And 2N-1 for Heun). I haven't checked the Flux PR to see if it is fixed there.

[EDIT] Ok, the flux and zimage scheduler PRs are merged and working.

@Pfannkuchensack
Copy link
Collaborator Author

The denoising start and end it not something you can recall for any type of model.
I forget the frontend changes for the Advance settings. i will fix that. I found that flux has the same problem with t5_encoder and clip_embed_model but the fields get autoselected on load and cant be cleared.
That is because i used it as base so i dont need to change it again if the pr for the scheduler get merged.

@lstein
Copy link
Collaborator

lstein commented Jan 3, 2026

The denoising start and end it not something you can recall for any type of model. I forget the frontend changes for the Advance settings. i will fix that. I found that flux has the same problem with t5_encoder and clip_embed_model but the fields get autoselected on load and cant be cleared. That is because i used it as base so i dont need to change it again if the pr for the scheduler get merged.

Thanks. Note that there are now merge conflicts due to the scheduler PRs.

Move Scheduler handler after MainModel in ImageMetadataHandlers so that
base-dependent recall logic (z-image scheduler) works correctly. The
Scheduler handler checks `base === 'z-image'` before dispatching the
z-image scheduler action, but this check failed when Scheduler ran
before MainModel was recalled.
@lstein
Copy link
Collaborator

lstein commented Jan 3, 2026

I'm afraid the behavior is still there. Any attempt to recall the parameters results in the disabling of the sub-model selections.

@lstein lstein added the v6.10.0 This PR is intended for v6.10.0 label Jan 4, 2026
lstein and others added 3 commits January 4, 2026 07:03
Instead of disabling mutually exclusive model selectors, automatically
clear conflicting models when a new selection is made. This applies to
VAE, Qwen3 Encoder, and Qwen3 Source selectors - selecting one now
clears the others. Also applies same logic during metadata recall.
@lstein lstein self-requested a review January 5, 2026 00:38
Copy link
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.

Now working as expected.

Note schema.ts needs typegen run.

@lstein lstein enabled auto-merge (squash) January 5, 2026 00:40
@lstein lstein disabled auto-merge January 5, 2026 00:40
@Pfannkuchensack Pfannkuchensack merged commit be26351 into invoke-ai:main Jan 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend PRs that change backend files frontend PRs that change frontend files invocations PRs that change invocations python PRs that change python files v6.10.0 This PR is intended for v6.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants