Show Settings LoRA aliases in picker lists instead of filenames.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-31 21:33:19 -05:00
co-authored by Cursor
parent 85dc378712
commit 350a0aeb45
5 changed files with 45 additions and 14 deletions
+6
View File
@@ -458,6 +458,7 @@
:model-value="shotLoraStacks[shot.n] || []"
:names="videoLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="Default"
add-label="Add LoRA"
@@ -523,6 +524,7 @@
:model-value="item.loraStack || []"
:names="videoLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="Default"
add-label="Add LoRA"
@@ -749,6 +751,7 @@
v-model="videoLoraStack"
:names="videoLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="None"
compact
@@ -811,6 +814,7 @@
v-model="imageV2LoraStack"
:names="imageV2LoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="Add LoRA"
missing-label="Wake GPU to load LoRAs"
@@ -935,6 +939,7 @@
v-model="imageLoraStack"
:names="imageLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="None"
compact
@@ -1401,6 +1406,7 @@
v-model="extendLoraStack"
:names="videoLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="Same as clip / none"
compact
+7 -3
View File
@@ -194,6 +194,7 @@
:model-value="readLoraStack(segment)"
:names="videoLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="Default"
add-label="Add LoRA"
@@ -225,7 +226,7 @@
>
<p class="text-sm font-medium text-zinc-100">{{ job.kind === 'edit' ? `Pass ${index + 1}` : `Shot ${index + 1}` }} <span class="font-normal text-zinc-500">· queued with this job</span></p>
<p class="mt-1 max-h-24 overflow-y-auto whitespace-pre-wrap text-xs text-zinc-400 [overflow-wrap:anywhere]">{{ shot.prompt }}</p>
<p v-if="loraStackLabel(readLoraStack(shot))" class="mt-1 text-[11px] text-zinc-500">{{ loraStackLabel(readLoraStack(shot)) }}</p>
<p v-if="loraStackLabel(readLoraStack(shot), loraAliases)" class="mt-1 text-[11px] text-zinc-500">{{ loraStackLabel(readLoraStack(shot), loraAliases) }}</p>
</li>
</ol>
</section>
@@ -339,6 +340,7 @@
:model-value="readLoraStack(segment)"
:names="videoLoraOptions"
:triggers="loraTriggers"
:aliases="loraAliases"
label="LoRA"
empty-label="Default"
add-label="Add LoRA"
@@ -465,6 +467,7 @@ type PendingRemove = {
const videoLoras = ref<string[]>([])
const loraTriggers = ref<Record<string, string>>({})
const loraAliases = ref<Record<string, string>>({})
const jobs = ref<StudioJobRow[]>([])
const orphans = ref<Queue[]>([])
const waitingCount = ref(0)
@@ -640,7 +643,7 @@ async function saveLoraTrigger(name: string, trigger: string) {
function segmentLoraLabel(queue: Queue, segment: Segment) {
const stack = readLoraStack(segment).length ? readLoraStack(segment) : readLoraStack(queue)
return loraStackLabel(stack)
return loraStackLabel(stack, loraAliases.value)
}
function segmentClass(queue: Queue, segment: Segment) {
@@ -1040,8 +1043,9 @@ onMounted(async () => {
void $fetch<{ video?: string[] }>('/api/loras').then((listed) => {
videoLoras.value = listed.video || []
}).catch(() => null)
void $fetch<{ loraTriggers?: Record<string, string> }>('/api/library?light=1').then((library) => {
void $fetch<{ loraTriggers?: Record<string, string>; loraAliases?: Record<string, string> }>('/api/library?light=1').then((library) => {
if (library.loraTriggers) loraTriggers.value = library.loraTriggers
if (library.loraAliases) loraAliases.value = library.loraAliases
}).catch(() => null)
window.addEventListener('keydown', onRemoveKey)
await loadQueues().catch((err: any) => {