Filter image LoRAs by flux- / krea- filename so each engine only lists its own.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-02 21:37:12 -05:00
co-authored by Cursor
parent 9fd96cb990
commit 46629ca51b
3 changed files with 52 additions and 29 deletions
+11 -10
View File
@@ -837,7 +837,7 @@
@insert-trigger="insertLoraTrigger($event)"
@update-trigger="saveLoraTrigger"
/>
<p v-if="v2Engine === 'krea'" class="mt-1 text-[11px] text-zinc-500">Flux LoRAs stay on the Flux engine. Switch back to restore that chain.</p>
<p v-if="v2Engine === 'krea'" class="mt-1 text-[11px] text-zinc-500">Krea only lists krea LoRAs. Flux files stay on the Flux engine.</p>
</div>
<div>
<AspectRatioPick :model-value="aspect" heading="Aspect ratio" :options="imageAspects" @update:model-value="setImageAspect" />
@@ -2215,8 +2215,8 @@ import {
filterLorasForUse,
insertActivationInShotScript,
insertActivationPhrase,
isKleinImageLora,
kleinLoraOnKreaMessage,
imageLoraEngineMismatchMessage,
imageLoraEngineOf,
loraIdentityKey,
loraStacksEqual,
normalizeLoraStack,
@@ -6813,7 +6813,7 @@ function setV2Engine(engine: ImageV2Engine) {
v2Steps.value = IMAGE_V2_KREA_STEPS
v2Cfg.value = IMAGE_V2_KREA_CFG
v2Turbo.value = false
if (previousStack.some(item => isKleinImageLora(item.name))) {
if (previousStack.some(item => imageLoraEngineOf(item.name) === 'flux')) {
toast('Flux LoRAs stay on the Flux engine. Switch back to restore that chain.')
}
if (v2Mode.value === 'edit') v2Denoise.value = IMAGE_V2_KREA_EDIT_DENOISE
@@ -6971,12 +6971,13 @@ async function editImageV2() {
filterLoraStackForStudio(imageV2LoraStack.value, ltxEnabled.value),
v2Engine.value
)
if (v2Engine.value === 'krea') {
const klein = imageV2LoraStack.value.find(item => isKleinImageLora(item.name))
if (klein) {
toast(kleinLoraOnKreaMessage(klein.name))
return
}
const wrongEngine = imageV2LoraStack.value.find((item) => {
const tagged = imageLoraEngineOf(item.name)
return tagged != null && tagged !== v2Engine.value
})
if (wrongEngine) {
toast(imageLoraEngineMismatchMessage(wrongEngine.name, v2Engine.value))
return
}
body.append('loraStack', JSON.stringify(v2Stack))
const downloadName = clipFileName(clipName.value.trim() || autoOutputName.value)