Enable the isolated xAIGen Studio 2 preview
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Studio2Bench v-if="config.public.studio !== 'xaigen'" />
|
||||
<main v-else class="mx-auto max-w-xl p-8"><h1 class="text-2xl font-semibold">Studio 2 preview</h1><p class="mt-3">Studio 2 is AIGen-first. Your LTX studio remains available.</p><NuxtLink to="/" class="mt-4 inline-block text-amber-200">Open xAIGen</NuxtLink></main>
|
||||
<div v-if="config.public.studio === 'xaigen'" class="border-b border-amber-400/20 bg-zinc-950 px-6 py-3 text-sm text-amber-100">xAIGen 2.0 development preview · Image and MiniMax tools are available here. <NuxtLink to="/" class="underline">Open the existing studio for LTX and music</NuxtLink>.</div>
|
||||
<Studio2Bench />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
@@ -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