Restore automatic video batch continuation and prepare stable Comfy loading

This commit is contained in:
Towsty
2026-09-09 06:58:35 -05:00
parent 4bf992210d
commit badf59d914
10 changed files with 83 additions and 21 deletions
+4
View File
@@ -1,4 +1,5 @@
import { createUpscaleHost } from './upscale-host.mjs'
import { stableMemoryArgs } from './comfy-memory-policy.mjs'
import { createGpuReservation } from './gpu-reservation.mjs'
import { createGpuProxy } from './gpu-proxy.mjs'
import { createYueGpHost } from './yuegp-host.mjs'
@@ -265,6 +266,9 @@ function resolveHeadlessLaunch() {
]
const extraArgs = String(inst.launchArgs || '').trim()
if (extraArgs) args.push(...extraArgs.split(/\s+/).filter(Boolean))
const cliPath = join(inst.installPath, 'ComfyUI', 'comfy', 'cli_args.py')
const memoryArgs = stableMemoryArgs(args, { cliSource: existsSync(cliPath) ? readFileSync(cliPath, 'utf8') : '' })
args.splice(0, args.length, ...memoryArgs)
if (extraConfig) args.push('--extra-model-paths-config', extraConfig)
if (existsSync(roots.input)) args.push('--input-directory', roots.input)
if (existsSync(roots.output)) args.push('--output-directory', roots.output)
+5
View File
@@ -0,0 +1,5 @@
/** Avoid the failing AIMDO disk-to-HostBuffer path on this Windows GPU host. */
export function stableMemoryArgs(args, { platform = process.platform, cliSource = '', dynamicVram = process.env.COMFY_DYNAMIC_VRAM } = {}) {
if (platform !== 'win32' || dynamicVram === 'true' || !cliSource.includes('--disable-dynamic-vram')) return [...args]
return [...args.filter(arg => !['--enable-dynamic-vram', '--disable-dynamic-vram', '--fast-disk'].includes(arg)), '--disable-dynamic-vram']
}