Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(create): a LoRA deleted from the folder leaves the stack

purple3d1d6bceb792
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 304b7679..e823bbf5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -55,6 +55,12 @@ cloud catalogue. It also fixes the bugs reported on GitHub and Discord since
bin, because LM Studio offers no way to delete a model from outside, and
Details showed nothing. Details now says to delete it in LM Studio under
My Models, and does the same for other local servers.
+- **A LoRA deleted from the loras folder leaves the stack.** Its pick stayed
+ saved, the stack said "2 active" with nothing ticked, and every run sent it
+ until ComfyUI refused with "Value not in list". Rescan and every connect now
+ drop picks whose file is gone, a run leaves out anything ComfyUI does not
+ list, a Character Studio character (a Z-Image LoRA) only goes to Z-Image
+ models, and Clear turns the whole stack off (issue 146).
- **A missing encoder or VAE no longer ends in "Value not in list".** When a
Qwen-Image 2.1, MiniMax H3 or other newer model was missing one of its files,
Create tried the old checkpoint graph and ComfyUI answered with
diff --git a/e2e/lora-stack-follows-the-folder.spec.ts b/e2e/lora-stack-follows-the-folder.spec.ts
new file mode 100644
index 00000000..da3b934b
--- /dev/null
+++ b/e2e/lora-stack-follows-the-folder.spec.ts
@@ -0,0 +1,100 @@
+import { test, expect, type Page } from '@playwright/test'
+import { tauriMockInit, DEFAULT_ASSISTANT_REPLY, DEFAULT_MODEL_NAME } from './support/tauri-mock'
+import { seedOnboardingDone } from './support/cloud-mock'
+
+/**
+ * GH #146 (joshmichael, 2026-10-01), nachgeklickt wie gemeldet: zwei LoRAs
+ * sind aus models/loras geloescht, stehen aber noch im gespeicherten Stapel.
+ * Der Stapel zeigte "2 active" ohne Haken, und jeder Lauf schickte sie mit.
+ * Hier antwortet ein nachgebautes ComfyUI ueber proxy_localhost, und die Liste
+ * der LoRAs laesst sich waehrend des Tests aendern (Datei geloescht).
+ */
+
+const STALE = ['char_gracechar_e110.safetensors', 'char_gracechar_zimage.safetensors']
+const STYLE = 'film_grain_xl.safetensors'
+const CHAR = 'char_mira_zimage.safetensors'
+
+async function bootWithFakeComfy(page: Page, loras: string[], imageModel: string) {
+ await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME, platform: 'windows' })
+ await seedOnboardingDone(page)
+ await page.addInitScript(([list, model, stale]) => {
+ const w = window as unknown as { __LORAS__: string[]; __TAURI_INTERNALS__: { invoke: (c: string, a: { url?: string }) => Promise<unknown> } }
+ if (!localStorage.getItem('create-store')) {
+ localStorage.setItem('create-store', JSON.stringify({
+ state: { backend: 'local', imageModel: model, selectedLoras: (stale as string[]).map((name) => ({ name, strength: 0.8 })) },
+ version: 2,
+ }))
+ }
+ w.__LORAS__ = list as string[]
+ const bridge = w.__TAURI_INTERNALS__
+ const invoke = bridge.invoke
+ const combo = (v: string[]) => [v]
+ const nodes = () => ({
+ CheckpointLoaderSimple: { input: { required: { ckpt_name: combo(['juggernautXL.safetensors']) } } },
+ UNETLoader: { input: { required: { unet_name: combo(['z_image_turbo_bf16.safetensors']) } } },
+ LoraLoader: { input: { required: { lora_name: combo(w.__LORAS__) } } },
+ VAELoader: { input: { required: { vae_name: combo(['ae.safetensors']) } } },
+ KSampler: { input: { required: { sampler_name: combo(['euler']), scheduler: combo(['simple']) } } },
+ })
+ bridge.invoke = (command, args) => {
+ // Rust answers a list for every file; the header itself is not under test.
+ if (command === 'sniff_model_files') return Promise.resolve([])
+ if (command !== 'proxy_localhost' || !args?.url?.includes(':8188')) return invoke(command, args)
+ const url = args.url
+ if (url.includes('/system_stats')) return Promise.resolve(JSON.stringify({ devices: [{ name: 'RTX 3060', type: 'cuda', vram_total: 12 * 1024 ** 3 }] }))
+ const one = /\/object_info\/([^/?]+)/.exec(url)
+ const all = nodes() as Record<string, unknown>
+ if (one) return Promise.resolve(JSON.stringify(one[1] in all ? { [one[1]]: all[one[1]] } : {}))
+ if (url.includes('/object_info')) return Promise.resolve(JSON.stringify(all))
+ return Promise.resolve('{}')
+ }
+ }, [loras, imageModel, STALE] as const)
+}
+
+async function openStack(page: Page) {
+ await page.goto('/')
+ await page.getByRole('button', { name: /^Create$/ }).click()
+ await page.getByRole('radio', { name: 'Image', exact: true }).click()
+ await page.getByRole('button', { name: 'Advanced settings' }).click()
+ const expert = page.getByRole('button', { name: 'Expert', exact: true })
+ await expect(expert).toBeVisible({ timeout: 15_000 })
+ if (!(await page.getByText(/^LoRA stack/).isVisible())) await expert.click()
+ await expect(page.getByRole('button', { name: /Rescan/ })).toBeVisible({ timeout: 15_000 })
+}
+
+const saved = (page: Page) => page.evaluate(() => JSON.parse(localStorage.getItem('create-store') || '{}').state?.selectedLoras)
+
+test('picks whose files are gone leave the stack, the count matches what is ticked', async ({ page }) => {
+ await bootWithFakeComfy(page, [STYLE], 'juggernautXL.safetensors')
+ await openStack(page)
+ await expect(page.getByText(STYLE.replace('.safetensors', ''))).toBeVisible()
+ await expect(page.getByText(/active/)).toHaveCount(0)
+ await expect.poll(() => saved(page)).toEqual([])
+
+ // Pick the one that exists, then delete its file and rescan.
+ await page.getByRole('button', { name: /film_grain_xl/ }).click()
+ await expect(page.getByText('· 1 active')).toBeVisible()
+ await page.evaluate(() => { (window as unknown as { __LORAS__: string[] }).__LORAS__ = [] })
+ await page.getByRole('button', { name: /Rescan/ }).click()
+ await expect(page.getByText(/active/)).toHaveCount(0)
+ await expect.poll(() => saved(page)).toEqual([])
+})
+
+test('Clear turns every LoRA off', async ({ page }) => {
+ await bootWithFakeComfy(page, [STYLE, CHAR], 'z_image_turbo_bf16.safetensors')
+ await openStack(page)
+ await page.getByRole('button', { name: /film_grain_xl/ }).click()
+ await page.getByRole('button', { name: /char_mira_zimage/ }).click()
+ await expect(page.getByText('· 2 active')).toBeVisible()
+ await page.getByRole('button', { name: /Clear/ }).click()
+ await expect(page.getByText(/active/)).toHaveCount(0)
+ await expect.poll(() => saved(page)).toEqual([])
+})
+
+test('a Z-Image character on an SDXL checkpoint says so and is not counted', async ({ page }) => {
+ await bootWithFakeComfy(page, [STYLE, CHAR], 'juggernautXL.safetensors')
+ await openStack(page)
+ await page.getByRole('button', { name: /char_mira_zimage/ }).click()
+ await expect(page.getByRole('button', { name: /char_mira_zimage/ })).toContainText('Z-Image only')
+ await expect(page.getByText(/active/)).toHaveCount(0)
+})
diff --git a/src/api/comfyui.ts b/src/api/comfyui.ts
index 4702732d..2f6992ec 100644
--- a/src/api/comfyui.ts
+++ b/src/api/comfyui.ts
@@ -782,7 +782,13 @@ export async function getCLIPModels(): Promise<string[]> {
* dropped into `<comfyui>/models/loras/`.
*/
export async function getLoraModels(): Promise<string[]> {
- return (await folderOptions('loras')) ?? []
+ return (await listedLoras()) ?? []
+}
+
+/** The same list, or null when ComfyUI could not be asked. Only a real list
+ * may prune the LoRA stack (GH #146). */
+export async function listedLoras(): Promise<string[] | null> {
+ return folderOptions('loras')
}
/** The five folders the R5 re-measure (2026-08-30) found missing entirely.
diff --git a/src/components/create/experimental/CreateContext.tsx b/src/components/create/experimental/CreateContext.tsx
index 8e93c324..c00b047d 100644
--- a/src/components/create/experimental/CreateContext.tsx
+++ b/src/components/create/experimental/CreateContext.tsx
@@ -3,7 +3,7 @@ import { useCreate } from '../../../hooks/useCreate'
import { useCloudCreate, hasActiveCloudRun } from '../../../hooks/useCloudCreate'
import { useCloudSession } from '../../../hooks/useCloudSession'
import { useCreateStore, type GalleryItem } from '../../../stores/createStore'
-import { getLoraModels, getVAEModels, checkComfyConnection, refreshComfyModels, bundleForVideoIntent } from '../../../api/comfyui'
+import { listedLoras, getVAEModels, checkComfyConnection, refreshComfyModels, bundleForVideoIntent } from '../../../api/comfyui'
import { getAllNodeInfo, clearNodeCache } from '../../../api/comfyui-nodes'
import { installCustomNodes, getImageBundles, getVideoBundles, getAudioBundles, getLipsyncBundles, getMotionBundles, startModelDownload, getDownloadProgress, modelsNotVisibleInComfy, judgeableFolders } from '../../../api/discover'
import { backendCall, isMacOS, isLinux } from '../../../api/backend'
@@ -204,10 +204,12 @@ export function CreateExpProvider({ children }: { children: ReactNode }) {
const refreshModelLists = useCallback(async () => {
if (connected !== true) return
const [loras, vaes] = await Promise.all([
- getLoraModels().catch(() => [] as string[]),
+ listedLoras().catch(() => null),
getVAEModels().catch(() => [] as string[]),
])
- setLoraList(loras)
+ setLoraList(loras ?? [])
+ // A file deleted from models/loras leaves the stack here (GH #146).
+ if (loras) useCreateStore.getState().keepListedLoras(loras)
setVaeList(['auto', ...vaes])
try {
const nodes = await getAllNodeInfo(true)
diff --git a/src/components/create/experimental/ParamGroups.tsx b/src/components/create/experimental/ParamGroups.tsx
index 1dd67886..2bd63965 100644
--- a/src/components/create/experimental/ParamGroups.tsx
+++ b/src/components/create/experimental/ParamGroups.tsx
@@ -1,4 +1,4 @@
-import { Gauge, Boxes, FlaskConical, RotateCcw, HelpCircle, RectangleHorizontal, RectangleVertical } from 'lucide-react'
+import { Gauge, Boxes, FlaskConical, RotateCcw, HelpCircle, RectangleHorizontal, RectangleVertical, X } from 'lucide-react'
import { VIDEO_RES_PRESETS, ASPECT_RATIOS, applyAspect, presetForOrientation, matchesPreset } from '../../../lib/create-resolution'
import { useCreateStore } from '../../../stores/createStore'
import { useCreateExp } from './CreateContext'
@@ -16,6 +16,7 @@ import { Button } from '../ui/Button'
import { Tooltip } from '../ui/Tooltip'
import { cn } from '../ui/cn'
import { HINWEIS_TEXT } from '../../../lib/hinweis'
+import { lorasForRun, loraFitsModel } from '../../../lib/lora-stack'
// Video families whose dynamic-workflow strategy actually wires a LoRA node:
// the generic UNET path (wan/hunyuan/ltx/mochi/cosmos) plus Wan 2.2's dedicated
@@ -57,6 +58,10 @@ export function ParamGroups() {
// LoRA is a local-only knob; for video it's offered only on families whose
// builder actually applies it (see VIDEO_LORA_FAMILIES). Image always qualifies.
const loraSupported = !isCloud && (!isVideo || VIDEO_LORA_FAMILIES.has(classifyModel(s.videoModel)))
+ // GH #146: the count is what a run sends, the same rule useCreate applies.
+ const laneModel = isVideo ? s.videoModel : s.imageModel
+ const laneType = (isVideo ? s.videoModelList : s.imageModelList).find((m) => m.name === laneModel)?.type ?? classifyModel(laneModel)
+ const activeLoras = lorasForRun(s.selectedLoras, loraList, laneType).use.length
// On cloud the worker only honours steps for images and guidance_scale for
// the flux family — hide the sliders elsewhere rather than show a dead
@@ -233,7 +238,13 @@ export function ParamGroups() {
{loraSupported && (
<div className="space-y-1.5">
<div className="flex items-center justify-between">
- <div className="t-control text-gray-400">LoRA stack {s.selectedLoras.length > 0 && <span className="t-mono text-gray-600">· {s.selectedLoras.length} active</span>}</div>
+ <div className="t-control text-gray-400">LoRA stack {activeLoras > 0 && <span className="t-mono text-gray-600">· {activeLoras} active</span>}</div>
+ <div className="flex items-center gap-3">
+ {s.selectedLoras.length > 0 && (
+ <button onClick={s.clearLoras} title="Turn every LoRA off" className="t-control text-gray-500 hover:text-gray-300 inline-flex items-center gap-1">
+ <X className="w-3 h-3" /> Clear
+ </button>
+ )}
{/* GH #109: the list loads once per connect, so a file dropped
into models/loras later never appeared — and with an empty
list the whole section was invisible, which read as "no LoRA
@@ -241,6 +252,7 @@ export function ParamGroups() {
<button onClick={() => { void refreshModelLists() }} title="Re-scan ComfyUI's models/loras folder" className="t-control text-gray-500 hover:text-gray-300 inline-flex items-center gap-1">
<RotateCcw className="w-3 h-3" /> Rescan
</button>
+ </div>
</div>
{loraList.length === 0 ? (
<div className="t-control text-gray-600">No LoRAs found yet. Drop .safetensors files into ComfyUI&apos;s models/loras folder and hit Rescan. Characters trained in Character Studio land there automatically.</div>
@@ -248,11 +260,12 @@ export function ParamGroups() {
<div className="space-y-1 max-h-44 overflow-y-auto scrollbar-thin">
{loraList.map((name) => {
const active = s.selectedLoras.find((l) => l.name === name)
+ const fits = loraFitsModel(name, laneType)
return (
<div key={name} className={cn('rounded-md border transition-colors', active ? 'border-white/15 bg-white/[0.06]' : 'border-white/[0.06]')}>
<button onClick={() => s.toggleLora(name)} className="w-full flex items-center justify-between px-2.5 py-1.5 t-control text-left text-gray-300">
<span className="truncate">{name.replace(/\.safetensors$/, '')}</span>
- <span className={cn('t-mono', active ? 'text-emerald-400' : 'text-gray-600')}>{active ? 'on' : 'off'}</span>
+ <span className={cn('t-mono', active && fits ? 'text-emerald-400' : 'text-gray-600')}>{active ? (fits ? 'on' : 'Z-Image only') : 'off'}</span>
</button>
{active && (
<div className="px-2.5 pb-2">
diff --git a/src/hooks/useCreate.ts b/src/hooks/useCreate.ts
index db171fe6..b150d985 100644
--- a/src/hooks/useCreate.ts
+++ b/src/hooks/useCreate.ts
@@ -20,6 +20,7 @@ import {
buildTxt2ImgWorkflow,
buildTxt2VidWorkflow,
legacyBuilderFits,
+ listedLoras,
canRunVideoIntent,
classifyModel,
isI2VModel,
@@ -68,6 +69,7 @@ import { useCreateStore, EDIT_MAX_DENOISE } from '../stores/createStore'
import { useWorkflowStore } from '../stores/workflowStore'
import { injectParameters } from '../api/workflows'
import { applyNativeHiresFix } from '../api/hires-fix'
+import { lorasForRun, skippedLorasLine } from '../lib/lora-stack'
import {
generateMlxImageDataUrl, isMlxImageHost, isMlxImageModel,
mlxStatus, listMlxImageModels, buildMlxImageModels, mergeImageModels, mlxModelIdFor,
@@ -954,6 +956,18 @@ export function useCreate() {
} catch { /* VRAM housekeeping is best-effort */ }
try {
+ // GH #146: the stack is checked against what ComfyUI lists right now.
+ // A deleted file or a Z-Image character on another model is left out
+ // with a line, instead of ComfyUI refusing the whole graph.
+ let runLoras = selectedLoras
+ if (selectedLoras.length) {
+ const listed = await listedLoras().catch(() => null)
+ const pick = lorasForRun(selectedLoras, listed, imageModelType)
+ if (listed && pick.missing.length) useCreateStore.getState().keepListedLoras(listed)
+ const line = skippedLorasLine(pick.missing, pick.otherModel)
+ if (line) setProgress(0, line)
+ runLoras = pick.use
+ }
let outputWidth = width
let outputHeight = height
const baseParams = {
@@ -974,8 +988,8 @@ export function useCreate() {
// contract (string[] + number[]); the old `loras` key was read by nobody,
// so LoRA selection was a silent no-op for image too (D#80). VAE/clip-skip
// stay image-only (the builder ignores them for video).
- ...(selectedLoras.length
- ? { lora: selectedLoras.map((l) => l.name), loraStrength: selectedLoras.map((l) => l.strength) }
+ ...(runLoras.length
+ ? { lora: runLoras.map((l) => l.name), loraStrength: runLoras.map((l) => l.strength) }
: {}),
...(selectedVae && selectedVae !== 'auto' ? { vae: selectedVae } : {}),
...(clipSkip > 0 ? { clipSkip } : {}),
diff --git a/src/lib/__tests__/a-deleted-lora-leaves-the-stack.test.ts b/src/lib/__tests__/a-deleted-lora-leaves-the-stack.test.ts
new file mode 100644
index 00000000..df47bb99
--- /dev/null
+++ b/src/lib/__tests__/a-deleted-lora-leaves-the-stack.test.ts
@@ -0,0 +1,73 @@
+/**
+ * GH #146 (joshmichael, 2026-10-01): LoRAs deleted from models/loras stayed in
+ * the persisted stack, showed as "2 active" with nothing ticked, and every run
+ * sent them until ComfyUI refused the graph. One was a Z-Image character that
+ * rode into the Animate lane.
+ *
+ * Run: npx vitest run src/lib/__tests__/a-deleted-lora-leaves-the-stack.test.ts
+ */
+import { describe, it, expect, beforeEach } from 'vitest'
+import { lorasForRun, loraFitsModel, skippedLorasLine } from '../lora-stack'
+import { useCreateStore } from '../../stores/createStore'
+
+const GONE = 'char_gracechar_e110.safetensors'
+const CHAR = 'char_gracechar_zimage.safetensors'
+const STYLE = 'film_grain_xl.safetensors'
+const pick = (name: string, strength = 0.8) => ({ name, strength })
+
+describe('what a run sends', () => {
+ it('leaves out a file ComfyUI no longer lists', () => {
+ const r = lorasForRun([pick(GONE), pick(STYLE)], [STYLE], 'sdxl')
+ expect(r.use).toEqual([pick(STYLE)])
+ expect(r.missing).toEqual([GONE])
+ })
+
+ it('sends a Z-Image character only to a Z-Image model', () => {
+ expect(loraFitsModel(CHAR, 'zimage')).toBe(true)
+ expect(loraFitsModel(CHAR, 'wan22')).toBe(false)
+ expect(loraFitsModel('loras/sub/char_mira_zimage.safetensors', 'sdxl')).toBe(false)
+ expect(loraFitsModel(STYLE, 'wan22')).toBe(true)
+ const r = lorasForRun([pick(CHAR), pick(STYLE)], [CHAR, STYLE], 'wan22')
+ expect(r.use).toEqual([pick(STYLE)])
+ expect(r.otherModel).toEqual([CHAR])
+ })
+
+ // Negative control: an unreachable ComfyUI is no proof a file is gone.
+ it('keeps every pick when the list could not be read', () => {
+ const r = lorasForRun([pick(GONE), pick(STYLE)], null, 'sdxl')
+ expect(r.use).toEqual([pick(GONE), pick(STYLE)])
+ expect(r.missing).toEqual([])
+ })
+
+ it('says in one line what it skipped, and nothing when it skipped nothing', () => {
+ expect(skippedLorasLine([GONE], [CHAR])).toBe('Skipping LoRA no longer in models/loras: char_gracechar_e110; Z-Image characters only: char_gracechar_zimage')
+ expect(skippedLorasLine([], [])).toBeNull()
+ })
+})
+
+describe('the stack follows the folder', () => {
+ beforeEach(() => {
+ useCreateStore.setState({
+ selectedLoras: [pick(GONE), pick(CHAR, 1.5), pick(STYLE)],
+ selectedCharacter: { id: `local:${CHAR}`, name: 'gracechar', triggerWord: 'gracechar', family: 'z-image' },
+ })
+ })
+
+ it('a rescan drops picks whose file is gone, and the character that rode on one', () => {
+ useCreateStore.getState().keepListedLoras([STYLE])
+ expect(useCreateStore.getState().selectedLoras).toEqual([pick(STYLE)])
+ expect(useCreateStore.getState().selectedCharacter).toBeNull()
+ })
+
+ it('a character whose file is still there stays picked', () => {
+ useCreateStore.getState().keepListedLoras([CHAR, STYLE])
+ expect(useCreateStore.getState().selectedLoras.map((l) => l.name)).toEqual([CHAR, STYLE])
+ expect(useCreateStore.getState().selectedCharacter?.id).toBe(`local:${CHAR}`)
+ })
+
+ it('Clear empties the stack and lets go of the local character', () => {
+ useCreateStore.getState().clearLoras()
+ expect(useCreateStore.getState().selectedLoras).toEqual([])
+ expect(useCreateStore.getState().selectedCharacter).toBeNull()
+ })
+})
diff --git a/src/lib/lora-stack.ts b/src/lib/lora-stack.ts
new file mode 100644
index 00000000..e4ebb728
--- /dev/null
+++ b/src/lib/lora-stack.ts
@@ -0,0 +1,48 @@
+// GH #146 (joshmichael, 2026-10-01): two LoRAs deleted from models/loras stayed
+// in the persisted stack. The picker showed "2 active" with nothing ticked,
+// every run sent them, and ComfyUI refused the graph with "Value not in list".
+// One of them was a Z-Image character LoRA riding into the Animate lane.
+// This file decides, from the one list ComfyUI reports, which picks a run uses.
+import { parseLocalCharacterLora } from '../api/trainer'
+import type { ModelType } from '../api/comfyui'
+
+export interface LoraPick {
+ name: string
+ strength: number
+}
+
+/** A character from Character Studio is a Z-Image LoRA (trainer naming
+ * `char_<name>_zimage`), so any other model would only get noise from it. */
+export function loraFitsModel(name: string, modelType: ModelType): boolean {
+ return !parseLocalCharacterLora(name) || modelType === 'zimage'
+}
+
+/**
+ * What a run sends. `listed` is ComfyUI's live loras list, or null when it
+ * could not be read; then nothing counts as missing, because "not reachable"
+ * is no proof a file is gone.
+ */
+export function lorasForRun(
+ picks: LoraPick[],
+ listed: string[] | null,
+ modelType: ModelType,
+): { use: LoraPick[]; missing: string[]; otherModel: string[] } {
+ const missing: string[] = []
+ const otherModel: string[] = []
+ const use: LoraPick[] = []
+ for (const p of picks) {
+ if (listed && !listed.includes(p.name)) missing.push(p.name)
+ else if (!loraFitsModel(p.name, modelType)) otherModel.push(p.name)
+ else use.push(p)
+ }
+ return { use, missing, otherModel }
+}
+
+/** The progress line for picks a run leaves out, or null when it uses all. */
+export function skippedLorasLine(missing: string[], otherModel: string[]): string | null {
+ const base = (n: string) => n.replace(/^.*[\\/]/, '').replace(/\.safetensors$/i, '')
+ const parts: string[] = []
+ if (missing.length) parts.push(`no longer in models/loras: ${missing.map(base).join(', ')}`)
+ if (otherModel.length) parts.push(`Z-Image characters only: ${otherModel.map(base).join(', ')}`)
+ return parts.length ? `Skipping LoRA ${parts.join('; ')}` : null
+}
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index f7f1b665..6de70d6d 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -156,7 +156,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [
},
{
title: 'Fixes from GitHub and Discord.',
- detail: 'A group chat answers with every LU Engine model in it, also when the models sit in your Model Storage folder. Ollama models download without one already installed. A GGUF from the CivitAI search lands where ComfyUI reads it. A fresh ComfyUI install on Windows gets its own Python environment, which fixes "hipdnn_backend.dll Bad Image" on AMD cards. The window no longer disappears on Linux. A character trained on your own machine takes up to 100 photos, and Details on an LM Studio model says where to delete it. A newer image or video model with a missing encoder or VAE names that file and offers the download, instead of ending in "Value not in list".',
+ detail: 'A group chat answers with every LU Engine model in it, also when the models sit in your Model Storage folder. Ollama models download without one already installed. A GGUF from the CivitAI search lands where ComfyUI reads it. A fresh ComfyUI install on Windows gets its own Python environment, which fixes "hipdnn_backend.dll Bad Image" on AMD cards. The window no longer disappears on Linux. A character trained on your own machine takes up to 100 photos, and Details on an LM Studio model says where to delete it. A newer image or video model with a missing encoder or VAE names that file and offers the download, instead of ending in "Value not in list". A LoRA deleted from the loras folder leaves the stack, a run only sends LoRAs ComfyUI lists, and Clear turns the stack off.',
},
{
title: 'Writing a long file no longer ends the run.',
diff --git a/src/stores/createStore.ts b/src/stores/createStore.ts
index 3dc88ccd..80a6aeab 100644
--- a/src/stores/createStore.ts
+++ b/src/stores/createStore.ts
@@ -435,6 +435,9 @@ interface CreateState {
toggleLora: (name: string) => void
setLoraStrengthFor: (name: string, strength: number) => void
clearLoras: () => void
+ /** Drops picks whose file ComfyUI no longer lists (GH #146), and the local
+ * character that rode on one of them. */
+ keepListedLoras: (listed: string[]) => void
setSelectedVae: (name: string) => void
setClipSkip: (n: number) => void
setGrowMaskBy: (n: number) => void
@@ -822,7 +825,17 @@ export const useCreateStore = create<CreateState>()(
toggleNegative: () => set((s) => ({ showNegative: !s.showNegative })),
toggleLora: (name) => set((s) => ({ selectedLoras: s.selectedLoras.some((l) => l.name === name) ? s.selectedLoras.filter((l) => l.name !== name) : [...s.selectedLoras, { name, strength: 0.8 }] })),
setLoraStrengthFor: (name, strength) => set((s) => ({ selectedLoras: s.selectedLoras.map((l) => l.name === name ? { ...l, strength: Math.max(0, Math.min(2, strength)) } : l) })),
- clearLoras: () => set({ selectedLoras: [] }),
+ clearLoras: () => set((s) => ({
+ selectedLoras: [],
+ selectedCharacter: s.selectedCharacter?.id.startsWith('local:') ? null : s.selectedCharacter,
+ })),
+ keepListedLoras: (listed) => set((s) => {
+ const kept = s.selectedLoras.filter((l) => listed.includes(l.name))
+ const char = s.selectedCharacter
+ const charGone = !!char?.id.startsWith('local:') && !listed.includes(char.id.slice('local:'.length))
+ if (kept.length === s.selectedLoras.length && !charGone) return {}
+ return { selectedLoras: kept, ...(charGone ? { selectedCharacter: null } : {}) }
+ }),
setSelectedVae: (name) => set({ selectedVae: name || 'auto' }),
setClipSkip: (n) => set({ clipSkip: Math.max(0, Math.min(12, Math.floor(n))) }),
setGrowMaskBy: (n) => set({ growMaskBy: Math.max(0, Math.min(64, Math.floor(n))) }),