Flatten image edit controls and let CFG/steps be typed past the old slider caps.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { addStudioJob, kickStudioQueue, listStudioJobs } from '~/server/utils/studioQueue'
|
||||
import { listStudioLoras, parsePostedLoraStack, parseShotLoraStacks, persistLoraFields } from '~/server/utils/loras'
|
||||
import type { LoraStackItem } from '~/utils/loras'
|
||||
import { clampVideoCfg } from '~/utils/generationPresets'
|
||||
import { defaultVideoSteps, isLtxWorkflow, isTextToVideo, LTX_DISABLED_MESSAGE, ltxWorkflowEnabled, parseVideoWorkflow } from '~/utils/videoModels'
|
||||
import { allowIdentityRefs, normalizePermanenceRefs, resolveGlobalLocks, type PermanenceRef } from '~/utils/globalLocks'
|
||||
|
||||
@@ -66,10 +67,7 @@ function parseFps(raw: string | undefined) {
|
||||
|
||||
function parseCfg(raw: string | undefined, turbo: boolean, ltx = false) {
|
||||
const fallback = ltx ? 3.5 : (turbo ? 1.5 : 4)
|
||||
const value = Number(raw)
|
||||
if (!Number.isFinite(value)) return fallback
|
||||
const snapped = Math.round(value * 2) / 2
|
||||
return Math.min(10, Math.max(1, snapped))
|
||||
return clampVideoCfg(raw, fallback)
|
||||
}
|
||||
|
||||
function parseSampler(raw: string | undefined, ltx = false) {
|
||||
|
||||
Reference in New Issue
Block a user