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:
+11
-10
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user