File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import type {
1010 ResultItem
1111} from '@/types/apiTypes'
1212import type { NodeId } from '@/types/comfyWorkflow'
13- import { instanceToPlain , plainToClass } from 'class-transformer'
13+ import { plainToClass } from 'class-transformer'
1414import _ from 'lodash'
1515import { defineStore } from 'pinia'
1616import { toRaw } from 'vue'
@@ -88,7 +88,12 @@ export class TaskItemImpl {
8888 }
8989
9090 get previewOutput ( ) : ResultItemImpl | undefined {
91- return this . flatOutputs . find ( ( output ) => output . supportsPreview )
91+ return (
92+ this . flatOutputs . find (
93+ // Prefer saved media files over the temp previews
94+ ( output ) => output . type === 'output' && output . supportsPreview
95+ ) ?? this . flatOutputs . find ( ( output ) => output . supportsPreview )
96+ )
9297 }
9398
9499 get apiTaskType ( ) : APITaskType {
You can’t perform that action at this time.
0 commit comments