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 half installed bundle does not pass for a finished one

David4c0a1253d5bd
diff --git a/src/components/create/experimental/Composer.tsx b/src/components/create/experimental/Composer.tsx
index 4935a3fc..31b1d8bc 100644
--- a/src/components/create/experimental/Composer.tsx
+++ b/src/components/create/experimental/Composer.tsx
@@ -1,4 +1,4 @@
-import { useCallback, useRef, useState } from 'react'
+import { useCallback, useRef, useState, useSyncExternalStore } from 'react'
import { motion, AnimatePresence } from 'framer-motion'
import { Sparkles, X, History, SlidersHorizontal, Square, Workflow } from 'lucide-react'
import { useCreateStore, MODEL_TYPE_DEFAULTS } from '../../../stores/createStore'
@@ -15,6 +15,7 @@ import {
runCredits,
} from '../../../stores/cloudCatalogStore'
import { INTENT_MAP } from './intents'
+import { subscribeInstallRuns, getInstallRun } from '../../../lib/model-install-runs'
import { useWorkflowStore, shouldShowManagerNotice } from '../../../stores/workflowStore'
import { noPromptHint, shouldShowLaneHint } from './laneHint'
import { ModelChip } from './ModelChip'
@@ -150,11 +151,22 @@ export function Composer({ onOpenAdvanced, onOpenWorkflows }: Props) {
: intent === 'motion'
? !!source && !!videoInput
: true
+ // A half-installed bundle is pickable long before it is usable: the lane
+ // list refills as soon as the diffusion model lands, while the VAE it needs
+ // is still coming down. Measured on the box 2026-08-15 at 88 percent of the
+ // Wan 2.2 bundle. Submitting there buys a ComfyUI error about a file that is
+ // already on its way, so the button waits for the run that is filling this
+ // lane. Local only: a cloud render needs nothing from that download.
+ const installing = useSyncExternalStore(
+ subscribeInstallRuns,
+ () => (backend === 'local' && meta.requiresModels ? getInstallRun(meta.requiresModels).running : false),
+ )
const canGenerate =
(!needPrompt || prompt.trim().length > 0) &&
(!meta.needsSource || !!source) &&
specialReady &&
- creditsOk
+ creditsOk &&
+ !installing
const showNoPromptHint = shouldShowLaneHint({ needPrompt, isGenerating, intent, specialReady })
return (
diff --git a/src/components/create/experimental/Stage.tsx b/src/components/create/experimental/Stage.tsx
index f5f7e64c..21fab254 100644
--- a/src/components/create/experimental/Stage.tsx
+++ b/src/components/create/experimental/Stage.tsx
@@ -87,10 +87,22 @@ export function Stage({ displayed, onOpenMaskEditor, onEditResult, onFullscreen
const characterTab = useCreateStore((s) => s.characterTab)
const characterTrain = intent === 'character' && characterTab === 'train'
+ // A bundle is not usable until ALL of its files are down, and the lane list
+ // refills the moment the diffusion model alone lands. Measured on the box
+ // 2026-08-15: at 88 percent the card vanished and Wan 2.2 TI2V was pickable
+ // while its VAE was still at 2 percent, so Create was one click away from a
+ // ComfyUI error about a file that was on its way. The card stays until the
+ // run it started is finished, which is also where its progress, its Cancel
+ // and its error message live.
+ const installRun = useSyncExternalStore(
+ subscribeInstallRuns,
+ () => (meta.requiresModels ? getInstallRun(meta.requiresModels).running : false),
+ )
+
let body: React.ReactNode
if (isGenerating) {
body = <GeneratingView />
- } else if (modelsMissing) {
+ } else if (modelsMissing || installRun) {
body = <ModelInstallCard kind={meta.requiresModels!} />
} else if (meta.capability && !capReady) {
body = <CapabilityCard cap={meta.capability} />
diff --git a/src/components/create/experimental/__tests__/install-run-holds-the-lane.test.ts b/src/components/create/experimental/__tests__/install-run-holds-the-lane.test.ts
new file mode 100644
index 00000000..f270eec2
--- /dev/null
+++ b/src/components/create/experimental/__tests__/install-run-holds-the-lane.test.ts
@@ -0,0 +1,38 @@
+/**
+ * Ein halb installiertes Buendel ist waehlbar, lange bevor es benutzbar ist.
+ *
+ * Gemessen auf der Box 2026-08-15: bei 88 Prozent des Wan 2.2 Buendels war
+ * `wan2.2_ti2v_5B_fp16.safetensors` fertig und damit in der Spurliste, die
+ * Installationskarte verschwand, und `wan2.2_vae.safetensors` stand bei
+ * 2 Prozent. Ein Klick auf Create haette einen ComfyUI-Fehler ueber eine Datei
+ * gebracht, die gerade noch geladen wird.
+ *
+ * Beide Stellen quellgepinnt, weil der ganze Fix jeweils eine Bedingung ist
+ * und kein anderer Test es merken wuerde.
+ */
+import { describe, it, expect } from 'vitest'
+import { readFileSync } from 'node:fs'
+import { resolve, dirname } from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+const hier = dirname(fileURLToPath(import.meta.url))
+const lies = (f: string) => readFileSync(resolve(hier, '..', f), 'utf8')
+
+describe('ein laufender Install haelt die Spur', () => {
+ it('die Karte bleibt stehen, solange der Lauf laeuft', () => {
+ const src = lies('Stage.tsx')
+ expect(src).toMatch(/} else if \(modelsMissing \|\| installRun\) \{/)
+ expect(src).toMatch(/getInstallRun\(meta\.requiresModels\)\.running/)
+ })
+
+ it('Create bleibt gesperrt, solange der Lauf laeuft', () => {
+ const src = lies('Composer.tsx')
+ const gate = src.slice(src.indexOf('const canGenerate ='), src.indexOf('const showNoPromptHint'))
+ expect(gate).toMatch(/!installing/)
+ })
+
+ it('nur lokal, ein Cloud-Lauf braucht aus dem Download nichts', () => {
+ const src = lies('Composer.tsx')
+ expect(src).toMatch(/backend === 'local' && meta\.requiresModels \? getInstallRun\(meta\.requiresModels\)\.running : false/)
+ })
+})