[backport core/1.34] fix: loading api-format workflow that contains "parameters" string#7516
Merged
christian-byrne merged 1 commit intocore/1.34from Dec 15, 2025
Merged
Conversation
…7411) ## Summary This change extends #7154 by making sure the `prompt` metadata tag is parsed before the legacy A1111 fallback when files are dropped onto the canvas. ComfyUI embeds two structured payloads into every first-class export format we support (PNG, WEBP, WEBM, MP4/MOV/M4V, GLB, SVG, MP3, OGG/FLAC, etc.): `workflow`, which is the full editor JSON with layout state, and `prompt`, which is the API graph sent to `/prompt`. During import we try format-specific decoders first and only as a last resort look for an A1111 file by scanning text chunks for a `parameters` entry. That compatibility path was always meant to be a best-effort option, but when we refactored the loader it accidentally enforced the order `workflow → parameters → prompt`. As soon as a dropped asset contained a `parameters` chunk—something Image Saver’s “A1111 compatibility” mode always adds—the A1111 converter activated and blocked the subsequent `prompt` loading logic. PR #7154 already lifted `workflow` ahead of the fallback, yet any file lacking the `workflow` chunk but holding both `prompt` and `parameters` still regressed. Reordering to `workflow → prompt → parameters` preserves the compatibility shim for genuine A1111 exports while guaranteeing native Comfy metadata always wins, eliminating the entire class of failures triggered merely by the presence of the word `parameters` in an unrelated metadata chunk. Fixes #7096, fixes #6988 ## Related (fixed by #7154) - #6633 - #6561 --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/15/2025, 07:49:58 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/15/2025, 08:42:39 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
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.
Backport of #7411 to
core/1.34Automatically created by backport workflow.
┆Issue is synchronized with this Notion page by Unito