mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
[backport cloud/1.39] feat: add hideOutputImages flag for nodes with custom preview (#8892)
Backport of #8857 to `cloud/1.39` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8892-backport-cloud-1-39-feat-add-hideOutputImages-flag-for-nodes-with-custom-preview-3086d73d365081f1b9c9eaa5a63c9c16) by [Unito](https://www.unito.io) Co-authored-by: Terry Jia <terryjia88@gmail.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
@@ -567,7 +567,8 @@ const nodeMedia = computed(() => {
|
||||
const newOutputs = nodeOutputs.nodeOutputs[nodeOutputLocatorId.value]
|
||||
const node = lgraphNode.value
|
||||
|
||||
if (!node || !newOutputs?.images?.length) return undefined
|
||||
if (!node || !newOutputs?.images?.length || node.hideOutputImages)
|
||||
return undefined
|
||||
|
||||
const urls = nodeOutputs.getNodeImageUrls(node)
|
||||
if (!urls?.length) return undefined
|
||||
|
||||
2
src/types/litegraph-augmentation.d.ts
vendored
2
src/types/litegraph-augmentation.d.ts
vendored
@@ -177,6 +177,8 @@ declare module '@/lib/litegraph/src/litegraph' {
|
||||
isLoading?: boolean
|
||||
/** The content type of the node's preview media */
|
||||
previewMediaType?: 'image' | 'video' | 'audio' | 'model'
|
||||
/** If true, output images are stored but not rendered below the node */
|
||||
hideOutputImages?: boolean
|
||||
|
||||
preview: string[]
|
||||
/** Index of the currently selected image on a multi-image node such as Preview Image */
|
||||
|
||||
Reference in New Issue
Block a user