Purge identity refs from desktop Comfy and keep them in the server stills library.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-27 08:12:54 -05:00
co-authored by Cursor
parent 1466762af4
commit 72f4909815
6 changed files with 48 additions and 6 deletions
+9 -1
View File
@@ -132,6 +132,11 @@ export function watchComfyJob(job: Job, options: { persist?: boolean } = {}): Pr
emitChainJob(job, { type: 'error', error: job.error, message: job.error })
if (job.id) deletePendingJob(job.id)
removeExtendTemp(job.library?.extendTmpDir)
await purgeComfyArtifacts({
imageName: job.library?.imageName,
imageSubfolder: job.library?.imageSubfolder,
extraImageNames: job.library?.referenceImageNames
})
resolve()
}
@@ -209,6 +214,7 @@ export function watchComfyJob(job: Job, options: { persist?: boolean } = {}): Pr
video,
imageName: job.library.imageName,
imageSubfolder: job.library.imageSubfolder,
extraImageNames: job.library.referenceImageNames,
promptId: job.promptId
})
if (!persist) {
@@ -405,6 +411,7 @@ export function ensurePendingWatch(pending: {
chainIndex?: number
stillId?: string
sound?: boolean
referenceImageNames?: string[]
}) {
const existing = getJob(pending.jobId)
if (existing) return existing
@@ -435,7 +442,8 @@ export function ensurePendingWatch(pending: {
parentClipId: pending.parentClipId,
chainIndex: pending.chainIndex,
stillId: pending.stillId,
sound: pending.sound
sound: pending.sound,
referenceImageNames: pending.referenceImageNames
}
})
if (!pendingWatches.has(job.id)) {