Keep the Klein Concept LoRA on xAIGen only.
AIGen hides the sliders, ignores snofs strengths, and strips the SNOFS node so that file cannot be queued from the public studio. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -124,8 +124,8 @@ function sanitizeImageV2Settings(raw: unknown): ImageV2PresetSettings {
|
||||
engine,
|
||||
task: mode === 'compose' ? parseImageV2Task(rec.task, 'scene') : mode === 'refine' ? 'refine' : mode === 'generate' ? 't2i' : 'scene',
|
||||
negative: String(rec.negative || '').slice(0, 2000),
|
||||
snofsModel: clampImageV2Strength(rec.snofsModel ?? rec.snofs_model, IMAGE_V2_SNOFS_MODEL),
|
||||
snofsClip: clampImageV2Strength(rec.snofsClip ?? rec.snofs_clip, IMAGE_V2_SNOFS_CLIP),
|
||||
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,
|
||||
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' ? clampImageSteps(rec.steps, IMAGE_V2_KREA_STEPS) : turbo ? 8 : clampImageSteps(rec.steps, IMAGE_V2_STEPS_DEFAULT),
|
||||
@@ -165,12 +165,15 @@ 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
|
||||
return {
|
||||
...preset,
|
||||
loraStack: filterLoraStackForStudio(preset.loraStack, xaigen),
|
||||
settings: preset.kind === 'video'
|
||||
? { ...preset.settings, workflow: coerceVideoWorkflow((preset.settings as VideoPresetSettings).workflow) }
|
||||
: preset.settings
|
||||
settings
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user