From 3aace5c8dc81d7bf1c3020edcbc4e6d37caa0a29 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 29 Jan 2026 17:10:08 -0800 Subject: [PATCH] fix: count non-dict items in outputs_count (#12166) 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 --- comfy_execution/jobs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comfy_execution/jobs.py b/comfy_execution/jobs.py index 97fd803b8..bf091a448 100644 --- a/comfy_execution/jobs.py +++ b/comfy_execution/jobs.py @@ -171,9 +171,10 @@ def get_outputs_summary(outputs: dict) -> tuple[int, Optional[dict]]: continue for item in items: + count += 1 + if not isinstance(item, dict): continue - count += 1 if preview_output is None and is_previewable(media_type, item): enriched = {