Match V2 turbo to the local graph: FL2VA models and 6 lightning steps.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-3
@@ -348,7 +348,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<p class="mb-2 text-xs uppercase tracking-wider text-zinc-500">Steps</p>
|
<p class="mb-2 text-xs uppercase tracking-wider text-zinc-500">Steps</p>
|
||||||
<div class="grid grid-cols-2 gap-2">
|
<div class="grid grid-cols-2 gap-2">
|
||||||
<button type="button" class="rounded-xl border px-3 py-2 text-sm" :class="turbo ? 'border-amber-300 bg-amber-400/10' : 'border-white/10'" @click="turbo = true">8 Turbo · LoRA on</button>
|
<button type="button" class="rounded-xl border px-3 py-2 text-sm" :class="turbo ? 'border-amber-300 bg-amber-400/10' : 'border-white/10'" @click="turbo = true">{{ videoWorkflow === 'v2' ? 6 : 8 }} Turbo · LoRA on</button>
|
||||||
<button type="button" class="rounded-xl border px-3 py-2 text-sm" :class="!turbo ? 'border-amber-300 bg-amber-400/10' : 'border-white/10'" @click="turbo = false">20 High-Fidelity · LoRA bypass</button>
|
<button type="button" class="rounded-xl border px-3 py-2 text-sm" :class="!turbo ? 'border-amber-300 bg-amber-400/10' : 'border-white/10'" @click="turbo = false">20 High-Fidelity · LoRA bypass</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -512,7 +512,7 @@
|
|||||||
<p v-else class="text-xs text-zinc-500">
|
<p v-else class="text-xs text-zinc-500">
|
||||||
{{ elapsedLabel }}
|
{{ elapsedLabel }}
|
||||||
<template v-if="chainTotal > 1"> · chain {{ chainStep }}/{{ chainTotal }}</template>
|
<template v-if="chainTotal > 1"> · chain {{ chainStep }}/{{ chainTotal }}</template>
|
||||||
· step {{ step }}/{{ maxStep || (turbo ? 8 : 20) }}
|
· step {{ step }}/{{ maxStep || defaultVideoSteps(turbo, videoWorkflow) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p v-if="studioMode === 'edit' && videoBusy" class="mt-2 text-xs text-zinc-500">Video generation continues in the background.</p>
|
<p v-if="studioMode === 'edit' && videoBusy" class="mt-2 text-xs text-zinc-500">Video generation continues in the background.</p>
|
||||||
@@ -2372,7 +2372,7 @@ async function generate() {
|
|||||||
body.append('width', String(outputSize.value.width))
|
body.append('width', String(outputSize.value.width))
|
||||||
body.append('height', String(outputSize.value.height))
|
body.append('height', String(outputSize.value.height))
|
||||||
body.append('turbo', String(turbo.value))
|
body.append('turbo', String(turbo.value))
|
||||||
body.append('steps', String(turbo.value ? 8 : 20))
|
body.append('steps', String(defaultVideoSteps(turbo.value, videoWorkflow.value)))
|
||||||
body.append('duration', String(duration.value))
|
body.append('duration', String(duration.value))
|
||||||
body.append('cfg', String(cfg.value))
|
body.append('cfg', String(cfg.value))
|
||||||
body.append('fps', String(fps.value))
|
body.append('fps', String(fps.value))
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
const cfg = parseCfg(source.cfg, turbo)
|
const cfg = parseCfg(source.cfg, turbo)
|
||||||
const samplerName = parseSampler(source.samplerName)
|
const samplerName = parseSampler(source.samplerName)
|
||||||
const scheduler = parseScheduler(source.scheduler)
|
const scheduler = parseScheduler(source.scheduler)
|
||||||
const steps = Number(source.steps || (turbo ? 8 : 20))
|
const steps = Number(source.steps || defaultVideoSteps(turbo, parseVideoWorkflow(source.workflow)))
|
||||||
const seed = Math.floor(Math.random() * 2_147_483_647)
|
const seed = Math.floor(Math.random() * 2_147_483_647)
|
||||||
const length = frameLength(durationSeconds, fps)
|
const length = frameLength(durationSeconds, fps)
|
||||||
const width = source.width || 1344
|
const width = source.width || 1344
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
|
|
||||||
const { width, height } = resolveOutputSize(fields.aspect, image.data, Number(fields.width), Number(fields.height))
|
const { width, height } = resolveOutputSize(fields.aspect, image.data, Number(fields.width), Number(fields.height))
|
||||||
const turbo = fields.turbo !== 'false'
|
const turbo = fields.turbo !== 'false'
|
||||||
const steps = Number(fields.steps || (turbo ? 8 : 20))
|
const steps = Number(fields.steps || defaultVideoSteps(turbo, workflow))
|
||||||
const seed = fields.seed && fields.seed !== 'random'
|
const seed = fields.seed && fields.seed !== 'random'
|
||||||
? Number(fields.seed)
|
? Number(fields.seed)
|
||||||
: Math.floor(Math.random() * 2_147_483_647)
|
: Math.floor(Math.random() * 2_147_483_647)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { Job, JobEvent } from '~/server/utils/jobs'
|
|||||||
function classifyError(message: string) {
|
function classifyError(message: string) {
|
||||||
const lower = message.toLowerCase()
|
const lower = message.toLowerCase()
|
||||||
if (lower.includes('out of memory') || (lower.includes('cuda') && lower.includes('alloc')) || lower.includes('vram')) {
|
if (lower.includes('out of memory') || (lower.includes('cuda') && lower.includes('alloc')) || lower.includes('vram')) {
|
||||||
return 'ComfyUI VRAM allocation failed. Try Turbo (8 steps) or a smaller aspect ratio.'
|
return 'ComfyUI VRAM allocation failed. Try Turbo or a smaller aspect ratio.'
|
||||||
}
|
}
|
||||||
if (lower.includes('econnrefused') || lower.includes('unreachable') || lower.includes('fetch failed')) {
|
if (lower.includes('econnrefused') || lower.includes('unreachable') || lower.includes('fetch failed')) {
|
||||||
return 'ComfyUI host connection dropped. Confirm the desktop instance is running and reachable on the LAN.'
|
return 'ComfyUI host connection dropped. Confirm the desktop instance is running and reachable on the LAN.'
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export function buildWorkflow(params: GenerateParams) {
|
|||||||
graph[qualityId].inputs.value = params.turbo ? 20 : params.steps
|
graph[qualityId].inputs.value = params.turbo ? 20 : params.steps
|
||||||
}
|
}
|
||||||
if (turboId && graph[turboId]?.class_type === 'PrimitiveInt') {
|
if (turboId && graph[turboId]?.class_type === 'PrimitiveInt') {
|
||||||
graph[turboId].inputs.value = params.turbo ? params.steps : 8
|
graph[turboId].inputs.value = params.turbo ? params.steps : (params.workflow === 'v2' ? 6 : 8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export function defaultVideoSteps(turbo: boolean, workflow = 'v1') {
|
||||||
|
if (!turbo) return 20
|
||||||
|
return workflow === 'v2' ? 6 : 8
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user