Add LoRA stacks with per-item strengths and named video/image generation presets so setups survive reload without mixing Klein onto MiniMax. Keep LTX Pink Cherry and xAIGen LoRAs on xAIGen, and run Recommend on Beast.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { listGenerationPresets, saveGenerationPreset } from '~/server/utils/generationPresets'
|
||||
import { parseGenerationPresetKind } from '~/utils/generationPresets'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { owner } = assertLibraryOwner(event)
|
||||
const body = await readBody<{
|
||||
name?: string
|
||||
kind?: string
|
||||
loraStack?: unknown
|
||||
settings?: unknown
|
||||
overwrite?: boolean
|
||||
}>(event).catch(() => ({}))
|
||||
const kind = parseGenerationPresetKind(body?.kind)
|
||||
const preset = await saveGenerationPreset(owner, {
|
||||
name: body?.name || '',
|
||||
kind,
|
||||
loraStack: body?.loraStack,
|
||||
settings: body?.settings,
|
||||
overwrite: body?.overwrite === true
|
||||
})
|
||||
return {
|
||||
preset,
|
||||
presets: listGenerationPresets(owner, kind)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user