Eliminate xAIGen and LTX; AIGen is the only studio.
Drop the studio split, backup-to-xAIGen link, and LTX engine option. Show all LoRAs on AIGen and remove the Photos show/hide inputs toggle so slots stay visible. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -43,7 +43,7 @@ import {
|
||||
sanitizeMusicLyrics,
|
||||
sanitizeMusicTags
|
||||
} from '~/utils/music'
|
||||
import { coerceVideoWorkflow, isXaigenStudio, parseVideoWorkflow } from '~/utils/videoModels'
|
||||
import { coerceVideoWorkflow, parseVideoWorkflow } from '~/utils/videoModels'
|
||||
|
||||
const writeChains = new Map<string, Promise<unknown>>()
|
||||
|
||||
@@ -143,8 +143,8 @@ function sanitizeImageV2Settings(raw: unknown): ImageV2PresetSettings {
|
||||
task: mode === 'compose' ? parseImageV2Task(rec.task, 'scene') : mode === 'refine' ? 'refine' : mode === 'generate' ? 't2i' : 'scene',
|
||||
prompt: sanitizePrompt(rec.prompt),
|
||||
negative: String(rec.negative || '').slice(0, 2000),
|
||||
snofsModel: isXaigenStudio() ? clampImageV2Strength(rec.snofsModel ?? rec.snofs_model, IMAGE_V2_SNOFS_MODEL) : 0,
|
||||
snofsClip: isXaigenStudio() ? clampImageV2Strength(rec.snofsClip ?? rec.snofs_clip, IMAGE_V2_SNOFS_CLIP) : 0,
|
||||
snofsModel: clampImageV2Strength(rec.snofsModel ?? rec.snofs_model, IMAGE_V2_SNOFS_MODEL),
|
||||
snofsClip: clampImageV2Strength(rec.snofsClip ?? rec.snofs_clip, IMAGE_V2_SNOFS_CLIP),
|
||||
consistencyModel: clampImageV2Strength(rec.consistencyModel ?? rec.consistency_model, mode === 'generate' ? 0 : IMAGE_V2_CONSISTENCY_MODEL),
|
||||
consistencyClip: clampImageV2Strength(rec.consistencyClip ?? rec.consistency_clip, mode === 'generate' ? 0 : IMAGE_V2_CONSISTENCY_CLIP),
|
||||
steps: engine === 'krea' || engine === 'moss' ? clampImageSteps(rec.steps, sampling.steps) : turbo ? 8 : clampImageSteps(rec.steps, IMAGE_V2_STEPS_DEFAULT),
|
||||
@@ -202,15 +202,12 @@ function normalizeStoredPreset(raw: unknown): GenerationPreset | null {
|
||||
}
|
||||
|
||||
function publicPreset(preset: GenerationPreset): GenerationPreset {
|
||||
const xaigen = isXaigenStudio()
|
||||
const settings = preset.kind === 'video'
|
||||
? { ...preset.settings, workflow: coerceVideoWorkflow((preset.settings as VideoPresetSettings).workflow) }
|
||||
: preset.kind === 'imagev2' && !xaigen
|
||||
? { ...preset.settings, snofsModel: 0, snofsClip: 0 }
|
||||
: preset.settings
|
||||
: preset.settings
|
||||
return {
|
||||
...preset,
|
||||
loraStack: filterLoraStackForStudio(preset.loraStack, xaigen),
|
||||
loraStack: filterLoraStackForStudio(preset.loraStack),
|
||||
settings
|
||||
}
|
||||
}
|
||||
@@ -234,8 +231,7 @@ export async function saveGenerationPreset(owner: string, input: {
|
||||
throw createError({ statusCode: 400, statusMessage: 'A preset name is required' })
|
||||
}
|
||||
const kind = parseGenerationPresetKind(input.kind)
|
||||
const xaigen = isXaigenStudio()
|
||||
const loraStack = filterLoraStackForStudio(input.loraStack, xaigen)
|
||||
const loraStack = filterLoraStackForStudio(input.loraStack)
|
||||
const settings = sanitizeSettings(kind, input.settings)
|
||||
const now = Date.now()
|
||||
return mutate(owner, (presets) => {
|
||||
|
||||
Reference in New Issue
Block a user