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:
@@ -152,6 +152,20 @@ export default defineEventHandler(async (event) => {
|
||||
height,
|
||||
hideInput
|
||||
})
|
||||
if (useIdentityRefs) {
|
||||
for (const [index, ref] of referenceImages.entries()) {
|
||||
if (!ref?.data?.length || isPipelineFrameFilename(ref.filename)) continue
|
||||
await saveStill({
|
||||
ownerKey,
|
||||
folderId,
|
||||
filename: ref.filename || `identity-ref-${index + 2}.png`,
|
||||
data: ref.data,
|
||||
width,
|
||||
height,
|
||||
hideInput
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const chainTotal = 1 + extensions.length
|
||||
const job = createJob()
|
||||
@@ -332,6 +346,7 @@ async function queueMiniMax(
|
||||
if (job.library) {
|
||||
job.library.imageName = uploaded.name
|
||||
job.library.imageSubfolder = uploaded.subfolder
|
||||
job.library.referenceImageNames = referenceNames.filter(Boolean)
|
||||
}
|
||||
emitChainJob(job, { type: 'status', message: queueing, progress: 6 })
|
||||
await waitForComfySocket(job, 4000)
|
||||
@@ -390,7 +405,8 @@ async function queueMiniMax(
|
||||
parentClipId: job.library.parentClipId,
|
||||
chainIndex: job.library.chainIndex,
|
||||
stillId: job.library.stillId,
|
||||
sound: job.library.sound
|
||||
sound: job.library.sound,
|
||||
referenceImageNames: job.library.referenceImageNames
|
||||
})
|
||||
}
|
||||
emitChainJob(job, { type: 'status', message: 'Job queued on ComfyUI', progress: 8 })
|
||||
|
||||
Reference in New Issue
Block a user