fix: count non-dict items in outputs_count#12166
Merged
Kosinkadink merged 1 commit intomasterfrom Jan 30, 2026
Merged
Conversation
Move count increment before isinstance(item, dict) check so that non-dict output items (like text strings from PreviewAny node) are included in outputs_count. This aligns OSS Python with Cloud's Go implementation which uses len(itemsArray) to count ALL items regardless of type. Amp-Thread-ID: https://ampcode.com/threads/T-019c0bb5-14e0-744f-8808-1e57653f3ae3 Co-authored-by: Amp <amp@ampcode.com>
Contributor
Author
|
This only affects |
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.
Fix
outputs_countnot counting non-dict output items (e.g., text strings from PreviewAny node).Problem
The
get_outputs_summary()function incomfy_execution/jobs.pyincrementscountafter theisinstance(item, dict)check, causing non-dict items to be skipped from the count.Text outputs from nodes like PreviewAny come as inline strings
["test"]rather than dicts, so they were never counted. This causedoutputs_count: 0in the jobs API response even when text outputs existed, which prevented the frontend from fetching and displaying them. Example problem:The solution in this PR aligns OSS Python with Cloud's Go implementation which uses len(itemsArray) to count ALL items regardless of type.