Stop ghost extension clips and recover last-frame extract after an interrupt.
Only one Comfy finish path can save a clip, hide catalog entries whose MP4 is missing, and retry last-frame extract so a truncated file does not dump FFmpeg noise into the UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -403,7 +403,14 @@ async function runGeneration(
|
||||
assertJobActive(job)
|
||||
|
||||
copyFileSync(currentPath, part1Path)
|
||||
await extractLastFrame(part1Path, framePath)
|
||||
try {
|
||||
await extractLastFrame(part1Path, framePath)
|
||||
} catch (error) {
|
||||
const detail = error instanceof Error ? error.message : String(error)
|
||||
throw new Error(detail.includes('last frame')
|
||||
? detail
|
||||
: `Could not extract the last frame for the next extension: ${detail}`)
|
||||
}
|
||||
const frame = readFileSync(framePath)
|
||||
job.library.extendPart1Path = part1Path
|
||||
job.library.prompt = ext.prompt
|
||||
|
||||
Reference in New Issue
Block a user