From 724fbf827a2a1b9279856b966c1599ec54e5044e Mon Sep 17 00:00:00 2001 From: Richard Yu Date: Tue, 16 Dec 2025 20:34:58 -0800 Subject: [PATCH] comment that format field is for frontend backward compatibility --- comfy_execution/jobs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/comfy_execution/jobs.py b/comfy_execution/jobs.py index c942c25f4..120f5dec6 100644 --- a/comfy_execution/jobs.py +++ b/comfy_execution/jobs.py @@ -41,6 +41,7 @@ def is_previewable(media_type: str, item: dict) -> bool: """ Check if an output item is previewable. Matches frontend logic in ComfyUI_frontend/src/stores/queueStore.ts + Maintains backwards compatibility with existing logic. Priority: 1. media_type is 'images', 'video', or 'audio' @@ -50,7 +51,8 @@ def is_previewable(media_type: str, item: dict) -> bool: if media_type in PREVIEWABLE_MEDIA_TYPES: return True - # Check format field (MIME type) + # Check format field (MIME type). + # Maintains backwards compatibility with how custom node outputs are handled in the frontend. fmt = item.get('format', '') if fmt and (fmt.startswith('video/') or fmt.startswith('audio/')): return True