Repository navigation
feat(nodes): add native metadata input and output across denoise invocations - #10083
Draft
skunkworxdark wants to merge 10 commits into
Draft
skunkworxdark wants to merge 10 commits into
skunkworxdark wants to merge 10 commits into
Conversation
Add WithMetadata and LatentsMetaOutput across all 17 denoise invocations with generation_mode inference, controlnets metadata, and v7 ref_images IP-Adapter serialization. Update MetadataToIPAdapters, MetadataToControlnets, and MetadataToT2IAdapters to recall v4 through v7 metadata formats and expand CORE_LABELS.
# Conflicts: # invokeai/app/invocations/metadata_linked.py # invokeai/app/invocations/qwen_image/qwen_image_denoise.py # invokeai/app/invocations/qwen_image_2_1/qwen_image_2_1_denoise.py # invokeai/frontend/api/openapi.json
…t/denoise-metadata # Conflicts: # invokeai/app/invocations/qwen_image_2_1/qwen_image_2_1_denoise.py
…t/denoise-metadata # Conflicts: # invokeai/app/invocations/krea2/krea2_denoise.py
lstein
self-requested a review
November 2, 2026 19:59
# Conflicts: # invokeai/frontend/api/schema.ts
1 task done
…metadata adapter nodes
…flux3 scheduler - Unwrap model loader submodel wrapper fields (VAEField, encoder fields, UNetField, TransformerField, PiDDecoderField) to their inner ModelIdentifierField in MetadataItemLinkedInvocation and MetadataItemInvocation. - Copy existing MetadataField.root before updating in MetadataItemLinkedInvocation. - Include scheduler='euler' in Flux3DenoiseInvocation._build_metadata().
Contributor
Author
Manual Workflow Testing Progress & Fixes (
|
- Allow value=None on MetadataItemLinkedInvocation and MetadataItemInvocation when an optional upstream output port (such as anima_model_loader.qwen3_5_encoder or sd3_model_loader.t5_encoder) resolves to None. - Omit None-valued entries from metadata output dictionaries.
Contributor
Author
Manual Workflow Testing Update (
|
This branch has not been deployed
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
Node workflows previously required wiring
core_metadatamanually or relying on four model-specific*_metawrapper invocations (denoise_latents_meta,flux_denoise_meta,z_image_denoise_meta,anima_denoise_meta) to record denoise parameters. The remaining 15 image and video denoise invocations either acceptedWithMetadatawithout emitting metadata or lackedWithMetadataaltogether, and workflow-generated IP-Adapters and ControlNets were out of sync with v7 metadata schemas.*_metawrappers; 15 denoise invocations could not emit or merge metadata on their output; IP-Adapters in workflows were written only to legacyipAdapters(ignored by v7 Reference Images recall), andmetadata_to_ip_adaptersfailed to recall v6/v7ref_images.WithMetadata, build and merge their denoise parameters via_build_metadata(), and returnmetadata: Optional[MetadataField](LatentsMetaOutputon all 17 image/Wan denoise invocations, and an optionalmetadatafield onLTX2DenoiseOutputandMiniMaxH3DenoiseOutput).app_versionandmetadata_version(CORE_METADATA_VERSION, currently"1.2.0") and infersgeneration_mode(*txt2img,*img2img,*inpaint, and video modes) when not already present in upstreammetadata.denoise_latents,tiled_multi_diffusion_denoise_latents,flux_denoise, andanima_denoiseserialize IP-Adapters into v7ref_images(type: "ip_adapter"), andmetadata_to_ip_adaptersrecalls v7ref_images(includingclip_vision_modelandmethod), v5/v6canvas_v2_metadata.referenceImages(both array andentitiescontainer formats), and v4ipAdapters.denoise_latents,tiled_multi_diffusion_denoise_latents,flux_denoise,flux2_denoise,anima_denoise,qwen_image_denoise,z_image_denoise) emitcontrolnets, andmetadata_to_controlnets/metadata_to_t2i_adaptersuse safe field lookups with v7control_layers(Restore Canvas metadata and recall parity #10127) and v5/v6canvas_v2_metadata.controlLayers(both array andentitiescontainer formats) fallbacks.*_metainvocations remain as deprecated thin subclasses of their base denoise invocations for backward compatibility with existing saved workflows.CORE_LABELSand its typed variants inmetadata_linked.py(CUSTOM_LABELfirst) across all supported model families.default_workflows/to match invocation versions (ltx2_denoise: 1.6.0,minimax_h3_denoise: 1.5.0,wan_denoise: 1.1.0,wan_video_denoise: 1.1.0).Architectural Roadmap: 3-Stage Metadata Unification
This PR is Stage 1 of a planned three-stage initiative to make metadata propagation first-class, automatic, and fully schema-compliant across node workflows:
Stage 1: Denoise Invocations Unification (Current PR)
core_metadatawiring.WithMetadataandmetadata: Optional[MetadataField]across all 19 image and video denoise invocations (LatentsMetaOutputsubclassingLatentsOutput).generation_mode,app_version, andmetadata_versioninference.controlnetsand v7ref_images(type: "ip_adapter").MetadataToIPAdapters,MetadataToControlnets, andMetadataToT2IAdapterssupporting v4, v5/v6 (canvas_v2_metadata), and v7 schemas.*_metawrapper nodes while preserving backward compatibility.Stage 2: Conditioning Metadata Propagation (Upcoming)
CompelInvocation,SDXLCompelPromptInvocation,FluxClipInvocation,CLIPSkipInvocation, etc.) to produce structured prompt and style metadata._build_metadata().Stage 3: Image Reference, Latent Operations & Decode Unification (Future)
LatentsBlendInvocation,CropLatentsInvocation, etc.).QA Instructions
uv run --no-sync ruff check invokeai/app/invocations tests/app/invocations/test_denoise_metadata.py(passed)uv run --no-sync ruff format --check invokeai/app/invocations tests/app/invocations/test_denoise_metadata.py(passed)uv run --no-sync pytest tests/app/invocations/test_denoise_metadata.py tests/app/services/workflow_records/test_default_workflows_registry.py tests/app/invocations/test_flux3_denoise_wiring.py(111 passed)pnpm format:openapi,pnpm typegen,pnpm lint, andpnpm testininvokeai/frontend/api(passed)pnpm run lint:tscininvokeai/frontend/webv2(passed)ref_imagesoutput and recall), and Krea-2; additional live workflow smoke-testing across remaining model families is in progress while in Draft.Review
ipAdapterskey emission fromdenoise_latents,tiled_multi_diffusion_denoise_latents, andflux_denoiseso v7 denoise nodes write IP-Adapters exclusively toref_imageswhilemetadata_to_ip_adaptersretains backward-compatible recall for v7, v5/v6, and v4 formats.MetadataToIPAdaptersInvocationsoIPAdapterOutputrecall only emits SD-1/SD-2/SDXL IP-Adapters.serialize_control_metadata,serialize_ip_adapter_ref_images, andMetadataTo*recall helpers against malformed dicts/lists and non-positive weights.moss_image_denoise,flux3_denoise, Anima IP-Adapter serialization, Krea-2 & Qwen-2.1 KV cache keys).metadatawiring in custom node workflows until Stage 2 (conditioning metadata propagation).Compatibility / Rollout
denoise_latents_meta,flux_denoise_meta,z_image_denoise_meta, oranima_denoise_metacontinue to load and execute via deprecated subclasses. Existing connections tolatentson all 17 image/Wan denoise invocations andvideo_latents/audio_latentsonltx2_denoiseandminimax_h3_denoiseare unchanged (LatentsMetaOutputis a subclass ofLatentsOutput).default_workflows/updated for all bumped denoise invocations.invokeai/frontend/api/openapi.jsonandinvokeai/frontend/api/schema.tsare updated for the newmetadatainput/output fields,InvocationOutputMap, and expandedCORE_LABELS*literals.Checklist
What's Newcopy (if doing a release after this PR)