mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-01 01:00:20 +08:00
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 <amp@ampcode.com>
This commit is contained in:
parent
b0d9708974
commit
3aace5c8dc
@ -171,9 +171,10 @@ def get_outputs_summary(outputs: dict) -> tuple[int, Optional[dict]]:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
|
count += 1
|
||||||
|
|
||||||
if not isinstance(item, dict):
|
if not isinstance(item, dict):
|
||||||
continue
|
continue
|
||||||
count += 1
|
|
||||||
|
|
||||||
if preview_output is None and is_previewable(media_type, item):
|
if preview_output is None and is_previewable(media_type, item):
|
||||||
enriched = {
|
enriched = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user