-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Feature: z-image + metadata node #8733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: z-image + metadata node #8733
Conversation
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.
…/Pfannkuchensack/InvokeAI into feature/zimage-scheduler-support
…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.
There was a problem hiding this 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:
- Select a Z-Image Turbo model
- Under Advanced, disable Qwen3 Source and enable the VAE and Qwen3 Encoder popups
- Generate an image
- Now generate an image with Qwen3 Source set, and the VAE and encoder popups empty.
- 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.
|
The denoising start and end it not something you can recall for any type of model. |
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.
|
I'm afraid the behavior is still there. Any attempt to recall the parameters results in the disabling of the sub-model selections. |
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
left a comment
There was a problem hiding this 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.
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) andflux_denoise_meta(FLUX) nodes.Captured metadata:
width/heightstepsguidance(guidance_scale)denoising_start/denoising_endschedulermodel(transformer)seedloras(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
Merge Plan
Requires
feature/zimage-scheduler-support#8705 branch to be merged first (base branch).Checklist
What's Newcopy (if doing a release after this PR)