Enable the isolated xAIGen Studio 2 preview
This commit is contained in:
@@ -4,8 +4,6 @@ import { saveRecord, readRecord } from '../../utils/studio2/store';
|
||||
import { addStudioJob, kickStudioQueue, type StudioJobPayload } from '../../utils/studioQueue';
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { owner } = assertLibraryOwner(event), raw = await readBody(event);
|
||||
if (useRuntimeConfig().public.studio === 'xaigen')
|
||||
throw createError({ statusCode: 400, statusMessage: 'Studio 2 is currently an AIGen preview. Continue using the existing LTX studio on xAIGen.' });
|
||||
let request: any;
|
||||
try {
|
||||
request = validateRequest(raw, useRuntimeConfig().public.studio === 'xaigen');
|
||||
@@ -14,6 +12,8 @@ export default defineEventHandler(async (event) => {
|
||||
throw createError({ statusCode: e.statusCode || 400, statusMessage: e.message });
|
||||
}
|
||||
const video = ['video', 'extend'].includes(request.mode);
|
||||
if (video && request.engine !== 'minimax')
|
||||
throw createError({ statusCode: 400, statusMessage: 'Use the existing xAIGen studio for LTX. Studio 2 video currently supports MiniMax.' });
|
||||
request.settings.loraStack = parsePostedLoraStack(request.settings.loraStack, video ? 'video' : 'image');
|
||||
if (!video)
|
||||
assertImageV2LoraStack(request.settings.loraStack, request.engine);
|
||||
|
||||
Reference in New Issue
Block a user