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.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(setup): lift an old pip before PyTorch, and say when the models are already here (GH #209, #211)
purple88e3a5bbc749
diff --git a/src-tauri/src/commands/install/comfy_install.rs b/src-tauri/src/commands/install/comfy_install.rsindex 79627e86..fb734fe3 100644--- a/src-tauri/src/commands/install/comfy_install.rs+++ b/src-tauri/src/commands/install/comfy_install.rs@@ -623,6 +623,15 @@ pub fn install_comfyui(lines appearing, the install is making progress, not hung.",);+ // GH #211: an old pip cannot read the PyTorch index.+ if let Some(line) = super::torch::lift_old_pip_before_torch(&effective_python, &install_status, Some(&cancel_flag)) {+ update("installing", &line);+ }+ if cancelled() {+ update("cancelled", "Install cancelled during PyTorch download.");+ return;+ }+let torch_arg_refs: Vec<&str> = torch_args.iter().map(|s| s.as_str()).collect();match pip_install_streaming_with_retry_cancellable(&torch_arg_refs, &effective_python, 3, &install_status, Some(&cancel_flag)) {Ok(()) => {diff --git a/src-tauri/src/commands/install/comfy_repair.rs b/src-tauri/src/commands/install/comfy_repair.rsindex 3ec2617f..fbe860f8 100644--- a/src-tauri/src/commands/install/comfy_repair.rs+++ b/src-tauri/src/commands/install/comfy_repair.rs@@ -346,6 +346,10 @@ pub fn repair_comfyui_env(state: State<'_, AppState>) -> Result<serde_json::Valu"installing","Downloading PyTorch into the new environment (~2 GB). Live pip output below.",);+ // GH #211: an old pip cannot read the PyTorch index.+ if let Some(line) = super::torch::lift_old_pip_before_torch(&venv_py, &install_status, Some(&cancel_flag)) {+ update("installing", &line);+ }let refs: Vec<&str> = torch_args.iter().map(|s| s.as_str()).collect();match pip_install_streaming_with_retry_cancellable(&refs, &venv_py, 3, &install_status, Some(&cancel_flag)) {Ok(()) => {diff --git a/src-tauri/src/commands/install/torch.rs b/src-tauri/src/commands/install/torch.rsindex d6f8d1d7..fefb7a07 100644--- a/src-tauri/src/commands/install/torch.rs+++ b/src-tauri/src/commands/install/torch.rs@@ -236,6 +236,74 @@ pub(crate) fn python_version_tuple(python_bin: &str) -> Option<(u32, u32)> {parse_version_tuple(String::from_utf8_lossy(&out.stdout).trim())}+// ── GH #211: an old pip in front of the PyTorch index ──────────────────────++/// GH #211 (31.10.2026, Windows, a ComfyUI venv on Python 3.10.11):+/// "PyTorch installation failed … No matching distribution found for+/// flit_core<4,>=3.11". Python 3.10.11 ships pip 23.0.1. Measured on the Mac+/// on 01.11.2026 with the same pip: it throws away the typing_extensions+/// 4.16.0 wheel from download.pytorch.org ("inconsistent Name: expected+/// 'typing-extensions', but metadata has 'typing_extensions'"), falls back to+/// the source archive, and building that needs flit_core, which the PyTorch+/// index does not carry. pip 23.1 fails the same way, pip 24.0 resolves the+/// whole set. Nothing about the Python itself was wrong, so the "no matching+/// wheel, press Repair environment" sentence sent the user in a circle: the+/// rebuild makes a venv with the same old pip.+pub(crate) const MODERN_PIP_MAJOR: u32 = 24;++/// The major of `python -m pip --version` ("pip 23.0.1 from … (python 3.10)").+pub(crate) fn pip_major_from_version_line(line: &str) -> Option<u32> {+ line.trim().strip_prefix("pip ")?.split('.').next()?.trim().parse().ok()+}++/// Pure: the pip args that lift an old pip before the PyTorch step, or None+/// when the pip there is new enough or could not be read (an unreadable pip+/// is left to the PyTorch step, which reports it with its own diagnosis).+/// The upgrade goes to PyPI, the index pip itself comes from.+pub(crate) fn pip_upgrade_before_torch_args(pip_version_line: Option<&str>) -> Option<Vec<String>> {+ let major = pip_major_from_version_line(pip_version_line?)?;+ if major >= MODERN_PIP_MAJOR {+ return None;+ }+ Some(+ ["-m", "pip", "install", "--progress-bar", "off", "--no-input", "--upgrade"]+ .iter()+ .map(|s| s.to_string())+ .chain(std::iter::once(format!("pip>={MODERN_PIP_MAJOR}.0")))+ .collect(),+ )+}++/// The venv's pip version line, under the same deadline as every other probe.+pub(crate) fn pip_version_line(python_bin: &str) -> Option<String> {+ let mut cmd = crate::python::python_command(python_bin);+ cmd.args(["-m", "pip", "--version"]);+ let out = run_probe_with_timeout(cmd, PYTHON_PROBE_TIMEOUT)?;+ if !out.status.success() {+ return None;+ }+ Some(String::from_utf8_lossy(&out.stdout).trim().to_string())+}++/// Lift an old pip in `python_bin` before PyTorch is installed into it. A+/// failed upgrade is not fatal: the PyTorch step runs anyway and keeps its+/// own diagnosis. Returns the line for the install log, None when nothing+/// had to be done.+pub(crate) fn lift_old_pip_before_torch(+ python_bin: &str,+ install_state: &std::sync::Arc<std::sync::Mutex<crate::state::InstallState>>,+ cancel: Option<&std::sync::Arc<std::sync::atomic::AtomicBool>>,+) -> Option<String> {+ let line = pip_version_line(python_bin);+ let args = pip_upgrade_before_torch_args(line.as_deref())?;+ let refs: Vec<&str> = args.iter().map(String::as_str).collect();+ Some(match super::pip::pip_install_streaming_with_retry_cancellable(&refs, python_bin, 2, install_state, cancel) {+ Ok(()) => format!("Updated pip in this environment ({}), the one it had cannot read the PyTorch index.", line.unwrap_or_default()),+ Err(e) if e == "cancelled" => "pip update cancelled.".to_string(),+ Err(e) => format!("Could not update pip in this environment, trying PyTorch with the one it has. {e}"),+ })+}+pub(crate) fn parse_version_tuple(s: &str) -> Option<(u32, u32)> {let mut parts = s.split('.');let major = parts.next()?.parse().ok()?;@@ -908,6 +976,29 @@ pub(crate) fn base_for_new_venv(mod tests {use super::*;+ // ── GH #211 ────────────────────────────────────────────────────────────++ #[test]+ fn the_pip_of_python_3_10_11_is_lifted_before_torch() {+ let line = "pip 23.0.1 from C:\\Users\\User\\ComfyUI\\venv\\lib\\site-packages\\pip (python 3.10)";+ assert_eq!(pip_major_from_version_line(line), Some(23));+ let args = pip_upgrade_before_torch_args(Some(line)).expect("pip 23 is lifted");+ assert_eq!(&args[..3], ["-m", "pip", "install"]);+ assert!(args.iter().any(|a| a == "--upgrade"));+ assert_eq!(args.last().map(String::as_str), Some("pip>=24.0"));+ assert!(!args.iter().any(|a| a.contains("index-url")), "pip comes from PyPI: {args:?}");+ // 23.1 fails the same way on the Mac.+ assert!(pip_upgrade_before_torch_args(Some("pip 23.1 from /x (python 3.10)")).is_some());+ }++ #[test]+ fn a_pip_that_reads_the_index_is_left_alone() {+ assert_eq!(pip_upgrade_before_torch_args(Some("pip 24.0 from /x (python 3.12)")), None);+ assert_eq!(pip_upgrade_before_torch_args(Some("pip 26.0.1 from /x (python 3.13)")), None);+ assert_eq!(pip_upgrade_before_torch_args(None), None);+ assert_eq!(pip_upgrade_before_torch_args(Some("No module named pip")), None);+ }+// ── PyTorch-Kanalwahl (W2-Befund 16.08., comfy_kitchen braucht 2.6+) ─#[test]diff --git a/src/components/create/experimental/CreateContext.tsx b/src/components/create/experimental/CreateContext.tsxindex f2c2d9b7..3b58e92f 100644--- a/src/components/create/experimental/CreateContext.tsx+++ b/src/components/create/experimental/CreateContext.tsx@@ -4,9 +4,10 @@ import { useRereadOnReturn } from '../../../hooks/useRereadOnReturn'import { useCloudCreate, hasActiveCloudRun } from '../../../hooks/useCloudCreate'import { useCloudSession } from '../../../hooks/useCloudSession'import { useCreateStore, type GalleryItem } from '../../../stores/createStore'-import { listedLoras, getVAEModels, checkComfyConnection, refreshComfyModels, bundleForVideoIntent } from '../../../api/comfyui'+import { listedLoras, getVAEModels, checkComfyConnection, refreshComfyModels } from '../../../api/comfyui'import { getAllNodeInfo, clearNodeCache } from '../../../api/comfyui-nodes'-import { installCustomNodes, nodePacksNotLoaded, assertBundleFits, checkBundlesOnDisk, getImageBundles, getVideoBundles, getAudioBundles, getLipsyncBundles, getMotionBundles, getUpscaleBundles, startModelDownload, getDownloadProgress, modelsNotVisibleInComfy, judgeableFolders } from '../../../api/discover'+import { installCustomNodes, nodePacksNotLoaded, assertBundleFits, checkBundlesOnDisk, startModelDownload, getDownloadProgress, modelsNotVisibleInComfy, judgeableFolders } from '../../../api/discover'+import { starterBundleFor } from '../../../lib/starter-bundle'import { CUSTOM_NODE_REGISTRY } from '../../../api/model-bundles'import { backendCall, isMacOS, isLinux } from '../../../api/backend'import { asComfyGpuMode, comfyCpuBannerText, type ComfyCpuBannerFacts } from '../../../lib/comfy-cpu-banner'@@ -474,20 +475,8 @@ export function CreateExpProvider({ children }: { children: ReactNode }) {return}await ensureComfyRunning(onProgress, signal)- // The video lane picks by the SAME rule the gate uses, because the two- // disagreed: Stage counts an i2v lane as empty unless it sees an i2v- // model, and this always installed the first bundle, a Wan 2.1 T2V. On- // Extend Video and Animate Image that meant a 9.2 GB download that could- // not possibly make the card go away. See bundleForVideoIntent.- const bundle = kind === 'video'- ? bundleForVideoIntent(getVideoBundles(), useCreateStore.getState().intent())- : (- kind === 'image' ? getImageBundles()- : kind === 'audio' ? getAudioBundles()- : kind === 'lipsync' ? getLipsyncBundles()- : kind === 'upscale' ? getUpscaleBundles()- : getMotionBundles()- )[0]+ // The same pick the setup card reads, see starterBundleFor.+ const bundle = starterBundleFor(kind, useCreateStore.getState().intent())if (!bundle) throw new Error('No starter bundle available for this intent.')// Before anything is installed or restarted: does what is still missing// fit on the drive at all.diff --git a/src/components/create/experimental/Stage.tsx b/src/components/create/experimental/Stage.tsxindex 12b530a8..63008b13 100644--- a/src/components/create/experimental/Stage.tsx+++ b/src/components/create/experimental/Stage.tsx@@ -1,6 +1,6 @@import { useEffect, useRef, useState, useSyncExternalStore, type ReactNode } from 'react'import { motion, AnimatePresence, useIsPresent } from 'framer-motion'-import { UploadCloud, ImagePlus, Scissors, Wand2, Sparkles, X, Loader2, Download, AlertTriangle, Image as ImageIcon, Film, Maximize2 } from 'lucide-react'+import { UploadCloud, ImagePlus, Scissors, Wand2, Sparkles, X, Loader2, Download, AlertTriangle, Image as ImageIcon, Film, Maximize2, Play } from 'lucide-react'import { useCreateStore, type GalleryItem } from '../../../stores/createStore'import { useModelStore } from '../../../stores/modelStore'import { createRunModel } from '../../../lib/render/create-studio'@@ -25,7 +25,8 @@ import { GALLERY_DRAG_TYPE, galleryItemUrl, fetchGalleryItemBlob, recoverGalleryimport { InstallCancelled } from '../../../lib/bundle-install'import { isMlxImageHost } from '../../../api/mlx-image'import { bundleForVideoIntent } from '../../../api/comfyui'-import { getVideoBundles } from '../../../api/discover'+import { getVideoBundles, checkBundlesOnDisk } from '../../../api/discover'+import { starterBundleFor, type StarterKind } from '../../../lib/starter-bundle'import { lipsyncFitLine } from './lipsyncFit'import { useGraphicsCardGb } from '../../../hooks/useGraphicsMemory'import { ReferenceStrip } from './ReferenceStrip'@@ -649,9 +650,12 @@ function ChangeImageButton({ onChange }: { onChange: (r: Awaited<ReturnType<type// install on Motion Control, got a spinner, and had no way to stop or even see// a 10.5 GB transfer. Cancel here aborts the install loop and kills the running// download in Rust; the partial file stays, so a later run resumes.-function InstallCardBody({ run, installing, status, err, onDismiss, onCancel, cancelTitle }: {+function InstallCardBody({ run, installing, status, err, onDismiss, onCancel, cancelTitle, startOnly }: {run: () => void; installing: boolean; status: string; err: string | nullonDismiss: () => void; onCancel: () => void+ /** Everything is on disk already and only ComfyUI is down: the button+ * starts it and says so, instead of offering a download (GH #209). */+ startOnly?: boolean/** What Cancel actually does here. The MLX installer on macOS runs in Rust* and outlives this view, so its Cancel stops watching, not downloading —* claiming otherwise would be a lie the next screen exposes. */@@ -674,7 +678,9 @@ function InstallCardBody({ run, installing, status, err, onDismiss, onCancel, ca</button></div>) : (- <Button variant="primary" icon={Download} onClick={run}>Download & install</Button>+ startOnly+ ? <Button variant="primary" icon={Play} onClick={run}>Start ComfyUI</Button>+ : <Button variant="primary" icon={Download} onClick={run}>Download & install</Button>)}{err && (<div className="relative t-control text-gray-300 bg-white/[0.03] rounded-[var(--radius-control)] px-2.5 py-2 pr-7 max-w-sm text-left">@@ -802,6 +808,35 @@ const MAC_BUNDLE_COPY = {},} as const+/** GH #209 (31.10.2026): after 40 GB of downloads the card still read "needs+ * a one-time download" and offered the download again, because the gate also+ * opens it while ComfyUI is down. The button never fetched a file twice (the+ * installer skips what is on disk), but the card said it would. When the+ * lane's bundle is complete on disk and ComfyUI is merely not running, the+ * card says that and offers to start it. Asked only in that situation. */+const ALREADY_ON_DISK_COPY = {+ title: 'Your model files are already here',+ description: 'ComfyUI is not running, so nothing can render yet. Start ComfyUI and LU picks up the files you have, nothing on disk is downloaded again.',+}++function useStarterOnDisk(kind: StarterKind, intent: string, ask: boolean): boolean {+ // The answer belongs to the lane it was asked for: a switch of lane or a+ // ComfyUI that came up drops it without a reset in the effect.+ const key = ask ? `${kind}|${intent}` : null+ const [onDiskFor, setOnDiskFor] = useState<string | null>(null)+ useEffect(() => {+ if (!key) return+ const bundle = starterBundleFor(kind, intent)+ if (!bundle) return+ let stale = false+ checkBundlesOnDisk([bundle])+ .then((r) => { if (!stale) setOnDiskFor(r.installed[bundle.name] === true ? key : null) })+ .catch(() => { /* the card keeps offering the download */ })+ return () => { stale = true }+ }, [key, kind, intent])+ return key !== null && onDiskFor === key+}+/** The plan of the Mac's video setup, for the card. Null until it is read,* and when it could not be read: the card then says what it always can. */function useMacVideoSetupPlan(enabled: boolean, installing: boolean): MacVideoSetupPlan | null {@@ -868,7 +903,7 @@ function videoBundleLine(intent: string): string {}function ModelInstallCard({ kind }: { kind: 'image' | 'video' | 'audio' | 'lipsync' | 'motion' | 'upscale' }) {- const { installModelBundle } = useCreateExp()+ const { installModelBundle, connected } = useCreateExp()const intent = useCreateStore((s) => s.intent())// The run outlives this card on purpose. Stage swaps the card away as soon as// a render starts or the lane list refills, and a 12 GB install must not lose@@ -894,6 +929,7 @@ function ModelInstallCard({ kind }: { kind: 'image' | 'video' | 'audio' | 'lipsy// A Mac no video starter runs on: the card says so and offers no download.// A run that is already on its way, or left an error, keeps its body.const nothingToInstall = macKind === 'video' && !macVideo.canInstall && !installing && !err+ const startOnly = useStarterOnDisk(kind, intent, !mac && connected === false && !installing)const run = () => startInstallRun(kind, (onStatus, signal) =>installModelBundle(kind, onStatus, signal).catch((e: unknown) => {@@ -906,8 +942,8 @@ function ModelInstallCard({ kind }: { kind: 'image' | 'video' | 'audio' | 'lipsy<EmptyStateicon={copy.icon}tone="accent"- title={installing ? 'Setting this up for you' : title}- description={installing ? (macKind ? BUSY_DESCRIPTION.macBundle[macKind] : BUSY_DESCRIPTION.bundle) : description}+ title={installing ? 'Setting this up for you' : startOnly ? ALREADY_ON_DISK_COPY.title : title}+ description={installing ? (macKind ? BUSY_DESCRIPTION.macBundle[macKind] : BUSY_DESCRIPTION.bundle) : startOnly ? ALREADY_ON_DISK_COPY.description : description}>{!nothingToInstall && (<InstallCardBody@@ -915,6 +951,7 @@ function ModelInstallCard({ kind }: { kind: 'image' | 'video' | 'audio' | 'lipsyonDismiss={() => clearInstallRun(kind)}onCancel={() => cancelInstallRun(kind)}cancelTitle={macKind ? MAC_CANCEL_TITLE[macKind] : undefined}+ startOnly={startOnly}/>)}</EmptyState>diff --git a/src/components/create/experimental/__tests__/setup-card-knows-the-files-are-here.test.tsx b/src/components/create/experimental/__tests__/setup-card-knows-the-files-are-here.test.tsxnew file mode 100644index 00000000..9eac1016--- /dev/null+++ b/src/components/create/experimental/__tests__/setup-card-knows-the-files-are-here.test.tsx@@ -0,0 +1,89 @@+// @vitest-environment jsdom+/**+ * GH #209 (31.10.2026): "after downloading like 40 Gigs … the software just+ * continues to ask to download 20 Gigs of model despite already having+ * downloaded everything once". The Create setup card also opens while+ * ComfyUI is down, and then read "needs a one-time download" with a+ * Download & install button over files that were all on disk. With the+ * lane's bundle complete, the card now says the files are here and offers+ * to start ComfyUI. Without them it still offers the download.+ *+ * Run: npx vitest run src/components/create/experimental/__tests__/setup-card-knows-the-files-are-here.test.tsx+ */+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'+import { render, cleanup, screen, act } from '@testing-library/react'++let connected: boolean | null = false+vi.mock('../CreateContext', () => ({+ useCreateExp: () => ({+ generate: vi.fn(), cancel: vi.fn(), makeVoice: vi.fn(), quota: null,+ samplerList: [], schedulerList: [], loraList: [], vaeList: [], refreshModelLists: vi.fn(),+ connected, modelsLoaded: true, modelLoadError: null, mlxMissing: null,+ installCapability: vi.fn(), installModelBundle: vi.fn(),+ }),+}))+vi.mock('../../../../api/mlx-image', () => ({ isMlxImageHost: () => false }))++let onDisk = true+const asked: string[] = []+vi.mock('../../../../api/discover', async (orig) => ({+ ...((await orig()) as Record<string, unknown>),+ checkBundlesOnDisk: vi.fn(async (bundles: Array<{ name: string }>) => {+ asked.push(...bundles.map((b) => b.name))+ return { installed: Object.fromEntries(bundles.map((b) => [b.name, onDisk])), files: new Set<string>() }+ }),+}))++import { Stage } from '../Stage'+import { useCreateStore } from '../../../../stores/createStore'++const stage = () => render(<Stage onOpenMaskEditor={() => {}} onFullscreen={() => {}} />)+const settle = () => act(async () => { for (let i = 0; i < 10; i++) await Promise.resolve() })++beforeEach(() => {+ connected = false+ onDisk = true+ asked.length = 0+ useCreateStore.setState({+ backend: 'local', isGenerating: false, error: null, gallery: [], source: null,+ upscaleModelList: [], imageModelList: [],+ } as never)+ useCreateStore.getState().setIntent('upscale')+})+afterEach(cleanup)++describe('the Create setup card while ComfyUI is down', () => {+ it('says the files are here and offers to start ComfyUI, not a download', async () => {+ stage()+ await settle()+ expect(asked.length).toBeGreaterThan(0)+ expect(screen.getByText('Your model files are already here')).toBeTruthy()+ expect(screen.getByText(/nothing on disk is downloaded again/)).toBeTruthy()+ expect(screen.getByRole('button', { name: /Start ComfyUI/ })).toBeTruthy()+ expect(screen.queryByText('Local Enhance Image needs a one-time download')).toBeNull()+ expect(screen.queryByRole('button', { name: /Download & install/ })).toBeNull()+ })++ it('still offers the download when the files are not there', async () => {+ onDisk = false+ stage()+ await settle()+ expect(screen.getByText('Local Enhance Image needs a one-time download')).toBeTruthy()+ expect(screen.getByRole('button', { name: /Download & install/ })).toBeTruthy()+ })++ it('does not ask the disk at all while ComfyUI runs', async () => {+ connected = true+ stage()+ await settle()+ expect(asked).toEqual([])+ expect(screen.getByText('Local Enhance Image needs a one-time download')).toBeTruthy()+ })++ it('the image lane says the same over its 6.5 GB starter', async () => {+ useCreateStore.getState().setIntent('image')+ stage()+ await settle()+ expect(screen.getByText('Your model files are already here')).toBeTruthy()+ })+})diff --git a/src/lib/__tests__/model-visible-wait.test.ts b/src/lib/__tests__/model-visible-wait.test.tsindex 6879fff6..17b37b9b 100644--- a/src/lib/__tests__/model-visible-wait.test.ts+++ b/src/lib/__tests__/model-visible-wait.test.ts@@ -111,8 +111,16 @@ describe('the install path uses it, and says something honest when it runs out',// bundle that their own gate rejects. 9.2 GB later the card was still// there, and pressing the button again did the same thing. Measured on the// box 2026-08-15.- expect(src).toMatch(/bundleForVideoIntent\(getVideoBundles\(\), useCreateStore\.getState\(\)\.intent\(\)\)/)+ // GH #209: the pick moved into lib/starter-bundle.ts, because the setup+ // card needs the same bundle to see whether it is already on disk.+ const starterSrc = readFileSync(+ resolve(dirname(fileURLToPath(import.meta.url)), '../starter-bundle.ts'),+ 'utf8',+ )+ expect(src).toMatch(/starterBundleFor\(kind, useCreateStore\.getState\(\)\.intent\(\)\)/)+ expect(starterSrc).toMatch(/if \(kind === 'video'\) return bundleForVideoIntent\(getVideoBundles\(\), intent\)/)expect(src).not.toMatch(/kind === 'video' \? getVideoBundles\(\)/)+ expect(starterSrc).not.toMatch(/kind === 'video' \? getVideoBundles\(\)/)})it('only the folders THIS engine enumerates are checked', () => {diff --git a/src/lib/starter-bundle.ts b/src/lib/starter-bundle.tsnew file mode 100644index 00000000..7712fb3c--- /dev/null+++ b/src/lib/starter-bundle.ts@@ -0,0 +1,27 @@+import { bundleForVideoIntent } from '../api/comfyui'+import {+ getImageBundles, getVideoBundles, getAudioBundles, getLipsyncBundles, getMotionBundles, getUpscaleBundles,+} from '../api/discover'+import type { ModelBundle } from '../api/model-bundles'++export type StarterKind = 'image' | 'video' | 'audio' | 'lipsync' | 'motion' | 'upscale'++/**+ * The bundle the Create setup card installs for a lane. One place, because+ * two need it: the installer, and the card, which has to know whether that+ * bundle is already on disk (GH #209, 31.10.2026: the card asked for the+ * download again over files that were all there).+ *+ * The video lane picks by the same rule the gate uses: Extend Video and+ * Animate Image need an image-to-video model, see bundleForVideoIntent.+ */+export function starterBundleFor(kind: StarterKind, intent: string): ModelBundle | undefined {+ if (kind === 'video') return bundleForVideoIntent(getVideoBundles(), intent)+ return (+ kind === 'image' ? getImageBundles()+ : kind === 'audio' ? getAudioBundles()+ : kind === 'lipsync' ? getLipsyncBundles()+ : kind === 'upscale' ? getUpscaleBundles()+ : getMotionBundles()+ )[0]+}