mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-16 00:12:33 +08:00
Compare commits
2 Commits
7f4fb73f95
...
724fbf827a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
724fbf827a | ||
|
|
03a7f1cfb3 |
@ -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
|
||||
@ -159,6 +161,7 @@ def get_outputs_summary(outputs: dict) -> tuple[int, Optional[dict]]:
|
||||
if not isinstance(node_outputs, dict):
|
||||
continue
|
||||
for media_type, items in node_outputs.items():
|
||||
# 'animated' is a boolean flag, not actual output items
|
||||
if media_type == 'animated' or not isinstance(items, list):
|
||||
continue
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user