Add extension-frame refine and lossless anchor options.
Prefer clip anchor PNGs for handoffs, optionally run Bilateral+Flux cleanup before I2V, and save decoded last-frame anchors so sequential extensions accumulate less compression damage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-2
@@ -790,6 +790,11 @@ export function clipLastFramePath(owner: string, id: string) {
|
||||
return join(clipDir(owner, id), 'last-frame.png')
|
||||
}
|
||||
|
||||
/** Lossless PNG handoff frame for cleaner sequential extensions (not the preview cache). */
|
||||
export function clipAnchorFramePath(owner: string, id: string) {
|
||||
return join(clipDir(owner, id), 'anchor-last.png')
|
||||
}
|
||||
|
||||
export function clipFirstFramePath(owner: string, id: string) {
|
||||
return join(clipDir(owner, id), 'first-frame.jpg')
|
||||
}
|
||||
@@ -2009,9 +2014,9 @@ async function downloadViaHostAgent(file: { filename: string; subfolder: string;
|
||||
|
||||
async function downloadComfyMedia(
|
||||
file: { filename: string; subfolder: string; type: string },
|
||||
kind: 'video' | 'audio'
|
||||
kind: 'video' | 'audio' | 'image'
|
||||
) {
|
||||
const extras = kind === 'video' ? ['video', ''] : ['audio', '']
|
||||
const extras = kind === 'video' ? ['video', ''] : kind === 'audio' ? ['audio', ''] : ['']
|
||||
const subfolders = [...new Set([file.subfolder, ...extras])]
|
||||
let lastStatus = 0
|
||||
let lastError = ''
|
||||
@@ -2049,6 +2054,10 @@ export async function downloadComfyAudio(audio: { filename: string; subfolder: s
|
||||
return downloadComfyMedia(audio, 'audio')
|
||||
}
|
||||
|
||||
export async function downloadComfyImage(image: { filename: string; subfolder: string; type: string }) {
|
||||
return downloadComfyMedia(image, 'image')
|
||||
}
|
||||
|
||||
export async function importMissingComfyVideos(owner: string, folderId?: string) {
|
||||
const catalog = readCatalog(owner)
|
||||
const folder = catalog.folders.find(item => item.id === folderId) || catalog.folders[0]
|
||||
|
||||
Reference in New Issue
Block a user