Let queued and player extensions use the full duration slider.
Stop clamping extensions to 3s or 5s so each segment can use the same length control as generate.
This commit is contained in:
@@ -6,7 +6,8 @@ const SCHEDULERS = new Set(['simple', 'ddim_uniform', 'sgm_uniform'])
|
||||
|
||||
function parseExtendDuration(raw: unknown) {
|
||||
const seconds = Number(raw)
|
||||
return seconds === 3 || seconds === 5 ? seconds : 5
|
||||
if (!Number.isFinite(seconds)) return 5
|
||||
return Math.min(120, Math.max(0.5, Math.round(seconds * 10) / 10))
|
||||
}
|
||||
|
||||
function frameLength(seconds: number, fps: number) {
|
||||
|
||||
@@ -8,15 +8,14 @@ function isComfyBusyTimeout(error: unknown) {
|
||||
return text.includes('still busy after 3 minutes')
|
||||
}
|
||||
|
||||
function parseDuration(raw: string) {
|
||||
function parseDuration(raw: unknown) {
|
||||
const seconds = Number(raw)
|
||||
if (!Number.isFinite(seconds)) return 5
|
||||
return Math.min(120, Math.max(0.5, seconds))
|
||||
return Math.min(120, Math.max(0.5, Math.round(seconds * 10) / 10))
|
||||
}
|
||||
|
||||
function parseExtendDuration(raw: unknown) {
|
||||
const seconds = Number(raw)
|
||||
return seconds === 3 || seconds === 5 ? seconds : 5
|
||||
return parseDuration(raw)
|
||||
}
|
||||
|
||||
function parseExtensions(raw: string | undefined) {
|
||||
|
||||
Reference in New Issue
Block a user