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: download overhaul — all 19 bundles verified, 0 errors
PurpleDoubleD2fa65f0b4249
diff --git a/CLAUDE.md b/CLAUDE.mdindex e24fbd49..d329971d 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -48,9 +48,20 @@ src-tauri/src/commands/ — Rust commands: install, process, download, prox18. **LTX bug fixed** — workflow was 'wan' instead of 'ltx'### What's LEFT to finish v2.3.0:-1. **Broken download UI** — User reports clicking Download on video bundles (Wan 2.1, FramePack, CogVideoX) doesn't visibly start. URLs are confirmed valid (HTTP 200). The `handleBundleInstall` → `installBundleComplete` flow now has error handling + `installingBundle` loading state, but needs E2E verification with real ComfyUI. May be a Rust backend issue with `download_model` command not finding ComfyUI path.-2. **Some bundle URLs are gated** — CogVideoX (Kijai repo, 401), SVD (Stability AI, 401), Cosmos (401), PyramidFlow (404). These need alternative public URLs or require HF token auth.-3. **Manual E2E test** with real ComfyUI instance — verify all downloads, workflows, I2V upload+1. **Text model download UX** — Ollama pull works, HF GGUF downloads need LM Studio or compatible provider path. Error message added but could be more user-friendly.+2. **E2E workflow test** — verify that downloaded models actually generate images/videos in ComfyUI (all files confirmed on disk in correct paths)++### What was FIXED (download overhaul):+1. **install_custom_node camelCase bug** — Tauri 2 expects camelCase args (repoUrl/nodeName), was sending snake_case. Fixed in discover.ts + vite.config.ts+2. **installBundleComplete per-file error handling** — single file failure no longer stops all downloads. Each file has independent try/catch+3. **"exists" status tracking** — files already on disk now properly marked as complete in downloadStore via comfyui-download-exists event+4. **Download UI consolidated** — removed duplicate progress display from DiscoverModels, all downloads exclusively shown in DownloadBadge (header)+5. **AnimateDiff subfolder bug** — models_dir() now routes custom_nodes/ paths to ComfyUI root instead of models/+6. **Broken URLs fixed** — Pony Diffusion (401) replaced with DreamShaper XL Turbo, SigCLIP (404) fixed filename+7. **Image bundle workflow types** — all were 'wan', now correctly sdxl/flux/flux2+8. **Dev-mode endpoints added** — detect_model_path + download_model_to_path for HF GGUF downloads+9. **All 38 ComfyUI URLs verified HTTP 200, all 24 HF GGUF URLs verified, all 29 Ollama models exist**+10. **All 19 bundles tested in live app — 0 errors, all files confirmed on disk**### Files modified in this branch (23 files, +3051 lines):- `src/api/comfyui.ts` — 7 new ModelTypes, COMPONENT_REGISTRY, uploadImage(), inputImage in VideoParamsdiff --git a/src-tauri/src/commands/download.rs b/src-tauri/src/commands/download.rsindex 6f6c3ca1..f5d03762 100644--- a/src-tauri/src/commands/download.rs+++ b/src-tauri/src/commands/download.rs@@ -12,7 +12,12 @@ use crate::state::{AppState, DownloadProgress};fn models_dir(comfy_path: &Option<String>, subfolder: &str) -> Result<PathBuf, String> {let base = comfy_path.as_ref().ok_or("ComfyUI path not set. Please set it in settings or install ComfyUI first.")?;- let dir = PathBuf::from(base).join("models").join(subfolder);+ // Subfolders starting with "custom_nodes/" are relative to ComfyUI root, not models/+ let dir = if subfolder.starts_with("custom_nodes/") || subfolder.starts_with("custom_nodes\\") {+ PathBuf::from(base).join(subfolder)+ } else {+ PathBuf::from(base).join("models").join(subfolder)+ };fs::create_dir_all(&dir).map_err(|e| format!("Create models dir: {}", e))?;Ok(dir)}diff --git a/src/api/__tests__/comfyui-bundles.test.ts b/src/api/__tests__/comfyui-bundles.test.tsindex d884c8c5..f8008787 100644--- a/src/api/__tests__/comfyui-bundles.test.ts+++ b/src/api/__tests__/comfyui-bundles.test.ts@@ -7,8 +7,9 @@ describe('Video Bundle Definitions', () => {bundles = getVideoBundles()})- it('has 14 video bundles', () => {- expect(bundles.length).toBe(14)+ it('has 13 video bundles', () => {+ // 14 original - Allegro (diffusers only) + CogVideoX 2B replaced by 5B I2V+ expect(bundles.length).toBe(13)})it('every bundle has required fields', () => {@@ -63,7 +64,7 @@ describe('Video Bundle Definitions', () => {it('I2V bundles have i2v: true', () => {const i2vBundles = bundles.filter(b => b.i2v)- expect(i2vBundles.length).toBe(2) // SVD + FramePack+ expect(i2vBundles.length).toBe(3) // SVD + FramePack + CogVideoX 5B I2Vconst i2vNames = i2vBundles.map(b => b.name)expect(i2vNames.some(n => n.includes('SVD'))).toBe(true)expect(i2vNames.some(n => n.includes('FramePack'))).toBe(true)@@ -129,12 +130,12 @@ describe('Shared File Deduplication', () => {expect(new Set(urls).size).toBe(1)})- it('cogvideox_vae.safetensors is shared between CogVideoX bundles', () => {+ it('cogvideox_vae is shared between CogVideoX bundles', () => {const cogBundles = bundles.filter(b => b.workflow === 'cogvideo')- expect(cogBundles.length).toBe(2) // 2B + 1.5 5B+ expect(cogBundles.length).toBe(2) // 5B I2V + 1.5 5Bfor (const b of cogBundles) {- const vae = b.files.find(f => f.filename === 'cogvideox_vae.safetensors')+ const vae = b.files.find(f => f.filename === 'cogvideox_vae_bf16.safetensors')expect(vae).toBeDefined()}})diff --git a/src/api/backend.ts b/src/api/backend.tsindex a5df7262..a32addb6 100644--- a/src/api/backend.ts+++ b/src/api/backend.ts@@ -120,6 +120,8 @@ export async function backendCall<T = any>(file_read: { path: "/local-api/file-read", method: "POST" },file_write: { path: "/local-api/file-write", method: "POST" },download_model: { path: "/local-api/download-model", method: "POST" },+ download_model_to_path: { path: "/local-api/download-model-to-path", method: "POST" },+ detect_model_path: { path: "/local-api/detect-model-path", method: "POST" },download_progress: { path: "/local-api/download-progress" },pause_download: { path: "/local-api/pause-download", method: "POST" },cancel_download: { path: "/local-api/cancel-download", method: "POST" },@@ -172,6 +174,10 @@ export async function backendCall<T = any>(}const res = await fetch(url, fetchOptions);+ if (!res.ok) {+ const body = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));+ throw new Error(body.error || `HTTP ${res.status}`);+ }return res.json();}diff --git a/src/api/discover.ts b/src/api/discover.tsindex bced48a6..e2a2868a 100644--- a/src/api/discover.ts+++ b/src/api/discover.ts@@ -68,7 +68,7 @@ export async function installCustomNodes(nodeKeys: string[]): Promise<void> {continue}try {- await backendCall('install_custom_node', { repo_url: entry.repo, node_name: entry.name })+ await backendCall('install_custom_node', { repoUrl: entry.repo, nodeName: entry.name })console.log(`[discover] Installed custom node: ${entry.name}`)} catch (err) {console.error(`[discover] Failed to install ${entry.name}:`, err)@@ -78,15 +78,38 @@ export async function installCustomNodes(nodeKeys: string[]): Promise<void> {}export async function installBundleComplete(bundle: ModelBundle): Promise<void> {- // Step 1: Install custom nodes if needed+ const errors: string[] = []++ // Step 1: Install custom nodes if needed (non-blocking — don't prevent downloads)if (bundle.customNodes && bundle.customNodes.length > 0) {- await installCustomNodes(bundle.customNodes)+ for (const key of bundle.customNodes) {+ try {+ const entry = CUSTOM_NODE_REGISTRY[key]+ if (!entry) continue+ await backendCall('install_custom_node', { repoUrl: entry.repo, nodeName: entry.name })+ console.log(`[discover] Installed custom node: ${entry.name}`)+ } catch (err) {+ console.warn('[discover] Custom node install failed (continuing with downloads):', err)+ errors.push(`Custom node ${key}: ${err}`)+ }+ }}- // Step 2: Download all model files+ // Step 2: Download all model files — each file independently (don't let one failure stop others)+ let startedDownloads = 0for (const file of bundle.files) {- if (file.downloadUrl && file.filename && file.subfolder) {- await startModelDownload(file.downloadUrl, file.subfolder, file.filename)+ if (!file.downloadUrl || !file.filename || !file.subfolder) continue+ try {+ const result = await startModelDownload(file.downloadUrl, file.subfolder, file.filename)+ if (result.status === 'exists') {+ // File already on disk — emit synthetic 'complete' so UI reflects it+ window.dispatchEvent(new CustomEvent('comfyui-download-exists', { detail: { filename: file.filename } }))+ } else {+ startedDownloads+++ }+ } catch (err) {+ console.error(`[discover] Download failed for ${file.filename}:`, err)+ errors.push(`${file.filename}: ${err}`)}}@@ -94,13 +117,16 @@ export async function installBundleComplete(bundle: ModelBundle): Promise<void>if (bundle.customNodes && bundle.customNodes.length > 0) {try {await backendCall('stop_comfyui')- // Small delay before restartawait new Promise(resolve => setTimeout(resolve, 2000))await backendCall('start_comfyui')} catch (err) {console.warn('[discover] ComfyUI restart after custom node install failed:', err)}}++ if (errors.length > 0) {+ throw new Error(`Bundle install had ${errors.length} issue(s): ${errors.join('; ')}`)+ }}// ─── Component Registry: What each model type needs to work ───@@ -486,7 +512,7 @@ export async function detectProviderModelPath(providerName: string): Promise<str/** Download a GGUF model to a specific directory (for non-Ollama providers) */export async function startModelDownloadToPath(url: string, destDir: string, filename: string): Promise<{ status: string; id: string; error?: string }> {- return backendCall('download_model_to_path', { url, dest_dir: destDir, filename })+ return backendCall('download_model_to_path', { url, destDir, filename })}// ─── Image Model Bundles ───@@ -500,7 +526,7 @@ export function getImageBundles(): ModelBundle[] {uncensored: true,totalSizeGB: 6.5,vramRequired: '6-8 GB',- workflow: 'wan',+ workflow: 'sdxl',url: 'https://huggingface.co/RunDiffusion/Juggernaut-XL-v9',files: [{@@ -519,7 +545,7 @@ export function getImageBundles(): ModelBundle[] {uncensored: true,totalSizeGB: 3.5,vramRequired: '6-8 GB',- workflow: 'wan',+ workflow: 'sdxl',url: 'https://huggingface.co/SG161222/RealVisXL_V5.0',files: [{@@ -538,7 +564,7 @@ export function getImageBundles(): ModelBundle[] {hot: true,totalSizeGB: 16,vramRequired: '8-10 GB',- workflow: 'wan',+ workflow: 'flux',url: 'https://huggingface.co/Comfy-Org/flux1-schnell',files: [{@@ -577,7 +603,7 @@ export function getImageBundles(): ModelBundle[] {tags: ['FLUX', 'Quality', 'FP8', '1024px'],totalSizeGB: 16,vramRequired: '8-10 GB',- workflow: 'wan',+ workflow: 'flux',url: 'https://huggingface.co/Comfy-Org/flux1-dev',files: [{@@ -617,7 +643,7 @@ export function getImageBundles(): ModelBundle[] {hot: true,totalSizeGB: 8,vramRequired: '8-10 GB',- workflow: 'wan',+ workflow: 'flux2',url: 'https://huggingface.co/Comfy-Org/vae-text-encorder-for-flux-klein-4b',files: [{@@ -644,21 +670,21 @@ export function getImageBundles(): ModelBundle[] {],},{- name: 'Pony Diffusion V6 XL (Anime/Stylized)',- description: 'Top anime and stylized checkpoint. Uncensored, no content filter. Great for creative work.',- tags: ['SDXL', 'Anime', 'Stylized', '1024px'],+ name: 'DreamShaper XL Turbo V2 (Anime/Stylized)',+ description: 'Fast anime and stylized art. Turbo mode for 4-step generation. Great for creative work.',+ tags: ['SDXL', 'Anime', 'Stylized', 'Turbo', '1024px'],uncensored: true,totalSizeGB: 6.5,vramRequired: '6-8 GB',- workflow: 'wan',- url: 'https://civitai.com/models/257749/pony-diffusion-v6-xl',+ workflow: 'sdxl',+ url: 'https://huggingface.co/Lykon/dreamshaper-xl-v2-turbo',files: [{- name: 'Pony Diffusion V6 XL',- description: 'SDXL checkpoint — anime and stylized art.',+ name: 'DreamShaper XL Turbo V2',+ description: 'SDXL checkpoint — anime and stylized art, turbo mode.',pulls: '', tags: ['Checkpoint', '6.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/AstraliteHeart/pony-diffusion-v6-xl/resolve/main/v6.safetensors',- filename: 'ponyDiffusionV6XL.safetensors', subfolder: 'checkpoints', sizeGB: 6.5,+ downloadUrl: 'https://huggingface.co/Lykon/dreamshaper-xl-v2-turbo/resolve/main/DreamShaperXL_Turbo_V2-SFW.safetensors',+ filename: 'DreamShaperXL_Turbo_V2.safetensors', subfolder: 'checkpoints', sizeGB: 6.5,},],},@@ -920,35 +946,36 @@ export function getVideoBundles(): ModelBundle[] {],},{- name: 'CogVideoX 2B',- description: 'Lightweight video model by Tsinghua. 480x480 output, 8-12 GB VRAM. Good text-to-video quality for its size.',- tags: ['CogVideoX', '480x480', 'Lightweight'],+ name: 'CogVideoX 5B I2V',+ description: 'CogVideoX 5B Image-to-Video by Tsinghua. Upload an image, get video. Needs 12+ GB VRAM.',+ tags: ['CogVideoX', 'I2V', 'Quality'],uncensored: true,- totalSizeGB: 15.3,- vramRequired: '8-12 GB',+ i2v: true,+ totalSizeGB: 21.2,+ vramRequired: '12+ GB',workflow: 'cogvideo',customNodes: ['cogvideox-wrapper'],- url: 'https://huggingface.co/THUDM/CogVideoX-2b',+ url: 'https://huggingface.co/Kijai/CogVideoX-comfy',files: [{- name: 'CogVideoX 2B Model',- description: 'Main video generation model.',- pulls: '', tags: ['Model', '5.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/CogVideoX_comfy/resolve/main/CogVideoX_2b_bf16.safetensors',- filename: 'CogVideoX_2b_bf16.safetensors', subfolder: 'diffusion_models', sizeGB: 5.5,+ name: 'CogVideoX 5B I2V Model',+ description: 'Main image-to-video generation model.',+ pulls: '', tags: ['Model', '11.3 GB'], updated: '',+ downloadUrl: 'https://huggingface.co/Kijai/CogVideoX-comfy/resolve/main/CogVideoX_1_0_5b_I2V_bf16.safetensors',+ filename: 'CogVideoX_1_0_5b_I2V_bf16.safetensors', subfolder: 'diffusion_models', sizeGB: 11.3,},{name: 'CogVideoX VAE',description: 'Required video encoder/decoder.',- pulls: '', tags: ['VAE', '300 MB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/CogVideoX_comfy/resolve/main/cogvideox_vae.safetensors',- filename: 'cogvideox_vae.safetensors', subfolder: 'vae', sizeGB: 0.3,+ pulls: '', tags: ['VAE', '430 MB'], updated: '',+ downloadUrl: 'https://huggingface.co/Kijai/CogVideoX-comfy/resolve/main/cogvideox_vae_bf16.safetensors',+ filename: 'cogvideox_vae_bf16.safetensors', subfolder: 'vae', sizeGB: 0.4,},{name: 'T5-XXL Text Encoder (FP16)',description: 'Required text encoder (shared with other models).',pulls: '', tags: ['Text Encoder', '9.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/CogVideoX_comfy/resolve/main/t5xxl_fp16.safetensors',+ downloadUrl: 'https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/text_encoders/t5xxl_fp16.safetensors',filename: 't5xxl_fp16.safetensors', subfolder: 'text_encoders', sizeGB: 9.5,},],@@ -958,31 +985,31 @@ export function getVideoBundles(): ModelBundle[] {description: 'Larger CogVideoX with 1360x768 output. Better quality, needs 16 GB VRAM.',tags: ['CogVideoX 1.5', '1360x768', 'Quality'],uncensored: true,- totalSizeGB: 19.8,+ totalSizeGB: 20.9,vramRequired: '16+ GB',workflow: 'cogvideo',customNodes: ['cogvideox-wrapper'],- url: 'https://huggingface.co/THUDM/CogVideoX1.5-5B',+ url: 'https://huggingface.co/Kijai/CogVideoX-comfy',files: [{name: 'CogVideoX 1.5 5B Model',description: 'Higher quality video model with wider resolution.',- pulls: '', tags: ['Model', '10 GB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/CogVideoX_comfy/resolve/main/CogVideoX1.5_5b_bf16.safetensors',- filename: 'CogVideoX1.5_5b_bf16.safetensors', subfolder: 'diffusion_models', sizeGB: 10,+ pulls: '', tags: ['Model', '11.1 GB'], updated: '',+ downloadUrl: 'https://huggingface.co/Kijai/CogVideoX-comfy/resolve/main/CogVideoX_1_5_5b_T2V_bf16.safetensors',+ filename: 'CogVideoX_1_5_5b_T2V_bf16.safetensors', subfolder: 'diffusion_models', sizeGB: 11.1,},{name: 'CogVideoX VAE',description: 'Required video encoder/decoder.',- pulls: '', tags: ['VAE', '300 MB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/CogVideoX_comfy/resolve/main/cogvideox_vae.safetensors',- filename: 'cogvideox_vae.safetensors', subfolder: 'vae', sizeGB: 0.3,+ pulls: '', tags: ['VAE', '430 MB'], updated: '',+ downloadUrl: 'https://huggingface.co/Kijai/CogVideoX-comfy/resolve/main/cogvideox_vae_bf16.safetensors',+ filename: 'cogvideox_vae_bf16.safetensors', subfolder: 'vae', sizeGB: 0.4,},{name: 'T5-XXL Text Encoder (FP16)',description: 'Required text encoder (shared with other models).',pulls: '', tags: ['Text Encoder', '9.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/CogVideoX_comfy/resolve/main/t5xxl_fp16.safetensors',+ downloadUrl: 'https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/text_encoders/t5xxl_fp16.safetensors',filename: 't5xxl_fp16.safetensors', subfolder: 'text_encoders', sizeGB: 9.5,},],@@ -1011,8 +1038,8 @@ export function getVideoBundles(): ModelBundle[] {name: 'SigCLIP Vision Encoder',description: 'Required vision encoder for image understanding.',pulls: '', tags: ['CLIP Vision', '900 MB'], updated: '',- downloadUrl: 'https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_384.safetensors',- filename: 'sigclip_vision_384.safetensors', subfolder: 'clip_vision', sizeGB: 0.9,+ downloadUrl: 'https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_patch14_384.safetensors',+ filename: 'sigclip_vision_patch14_384.safetensors', subfolder: 'clip_vision', sizeGB: 0.9,},{name: 'HunyuanVideo VAE',@@ -1041,7 +1068,7 @@ export function getVideoBundles(): ModelBundle[] {name: 'SVD-XT 1.1 (Image-to-Video)',description: 'Stable Video Diffusion by Stability AI. Upload an image, get 25 frames of smooth video. Native ComfyUI support.',tags: ['SVD', 'I2V', 'Native'],- totalSizeGB: 9.5,+ totalSizeGB: 4.8,vramRequired: '12+ GB',workflow: 'svd',i2v: true,@@ -1050,9 +1077,9 @@ export function getVideoBundles(): ModelBundle[] {{name: 'SVD-XT 1.1 Checkpoint',description: 'Complete I2V model — no additional downloads needed.',- pulls: '', tags: ['Checkpoint', '9.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt-1-1/resolve/main/svd_xt_1_1.safetensors',- filename: 'svd_xt_1_1.safetensors', subfolder: 'checkpoints', sizeGB: 9.5,+ pulls: '', tags: ['Checkpoint', '4.8 GB'], updated: '',+ downloadUrl: 'https://huggingface.co/vdo/stable-video-diffusion-img2vid-xt-1-1/resolve/main/svd_xt_1_1.safetensors',+ filename: 'svd_xt_1_1.safetensors', subfolder: 'checkpoints', sizeGB: 4.8,},],},@@ -1082,50 +1109,32 @@ export function getVideoBundles(): ModelBundle[] {],},{- name: 'Pyramid Flow SD3',+ name: 'Pyramid Flow MiniFlux v2',description: 'Pyramid-style temporal generation based on SD3. 768x1280 output. Experimental but interesting results.',tags: ['Pyramid Flow', '768x1280', 'Experimental'],- totalSizeGB: 8.8,+ totalSizeGB: 4.6,vramRequired: '16+ GB',workflow: 'pyramidflow',customNodes: ['pyramidflow-wrapper'],- url: 'https://huggingface.co/rain1011/pyramid-flow-sd3',+ url: 'https://huggingface.co/Kijai/pyramid-flow-comfy',files: [{- name: 'Pyramid Flow Model',+ name: 'Pyramid Flow MiniFlux v2',description: 'Main video generation model.',- pulls: '', tags: ['Model', '8.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/pyramid-flow-comfy/resolve/main/pyramid_flow_model.safetensors',- filename: 'pyramid_flow_model.safetensors', subfolder: 'diffusion_models', sizeGB: 8.5,+ pulls: '', tags: ['Model', '3.9 GB'], updated: '',+ downloadUrl: 'https://huggingface.co/Kijai/pyramid-flow-comfy/resolve/main/pyramid_flow_miniflux_bf16_v2.safetensors',+ filename: 'pyramid_flow_miniflux_bf16_v2.safetensors', subfolder: 'diffusion_models', sizeGB: 3.9,},{name: 'Pyramid Flow VAE',description: 'Required video encoder/decoder.',- pulls: '', tags: ['VAE', '300 MB'], updated: '',- downloadUrl: 'https://huggingface.co/Kijai/pyramid-flow-comfy/resolve/main/pyramid_flow_vae.safetensors',- filename: 'pyramid_flow_vae.safetensors', subfolder: 'vae', sizeGB: 0.3,- },- ],- },- {- name: 'Allegro',- description: 'Rhymes AI Allegro — 720x1280 video at 15 FPS. Diffusers format, auto-downloaded on first use. High VRAM needed.',- tags: ['Allegro', '720x1280', 'High-End'],- totalSizeGB: 15.5,- vramRequired: '24+ GB',- workflow: 'allegro',- customNodes: ['allegro'],- url: 'https://huggingface.co/rhymes-ai/Allegro',- files: [- {- name: 'Allegro Model (Diffusers)',- description: 'Full model — auto-downloads additional components on first ComfyUI use.',- pulls: '', tags: ['Model', '~15.5 GB'], updated: '',- downloadUrl: 'https://huggingface.co/rhymes-ai/Allegro/resolve/main/model_index.json',- filename: 'allegro_model_index.json', subfolder: 'diffusion_models', sizeGB: 15.5,+ pulls: '', tags: ['VAE', '670 MB'], updated: '',+ downloadUrl: 'https://huggingface.co/Kijai/pyramid-flow-comfy/resolve/main/pyramid_flow_vae_bf16.safetensors',+ filename: 'pyramid_flow_vae_bf16.safetensors', subfolder: 'vae', sizeGB: 0.7,},],},+ // Allegro removed — diffusers format only, no single-file safetensors available for one-click install{name: 'NVIDIA Cosmos 7B',description: 'NVIDIA Cosmos Diffusion 7B Text-to-World. 1024x1024 output at 24 FPS. Native ComfyUI support. Uses oldt5 text encoder (NOT t5xxl).',@@ -1133,27 +1142,27 @@ export function getVideoBundles(): ModelBundle[] {totalSizeGB: 19.2,vramRequired: '24+ GB',workflow: 'cosmos',- url: 'https://huggingface.co/comfyanonymous/cosmos_1.0_text2world_safetensors',+ url: 'https://huggingface.co/mcmonkey/cosmos-1.0',files: [{name: 'Cosmos 7B Text2World',description: 'Main video generation model by NVIDIA.',pulls: '', tags: ['Model', '14 GB'], updated: '',- downloadUrl: 'https://huggingface.co/comfyanonymous/cosmos_1.0_text2world_safetensors/resolve/main/Cosmos-1_0-Diffusion-7B-Text2World.safetensors',+ downloadUrl: 'https://huggingface.co/mcmonkey/cosmos-1.0/resolve/main/Cosmos-1_0-Diffusion-7B-Text2World.safetensors',filename: 'Cosmos-1_0-Diffusion-7B-Text2World.safetensors', subfolder: 'diffusion_models', sizeGB: 14,},{name: 'OldT5-XXL Text Encoder (FP8)',description: 'Required text encoder — NOT the same as regular T5-XXL!',pulls: '', tags: ['Text Encoder', '4.9 GB'], updated: '',- downloadUrl: 'https://huggingface.co/comfyanonymous/cosmos_1.0_text2world_safetensors/resolve/main/oldt5_xxl_fp8_e4m3fn_scaled.safetensors',+ downloadUrl: 'https://huggingface.co/comfyanonymous/cosmos_1.0_text_encoder_and_VAE_ComfyUI/resolve/main/text_encoders/oldt5_xxl_fp8_e4m3fn_scaled.safetensors',filename: 'oldt5_xxl_fp8_e4m3fn_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 4.9,},{name: 'Cosmos VAE',description: 'Required video encoder/decoder.',pulls: '', tags: ['VAE', '300 MB'], updated: '',- downloadUrl: 'https://huggingface.co/comfyanonymous/cosmos_1.0_text2world_safetensors/resolve/main/cosmos_cv8x8x8_1.0.safetensors',+ downloadUrl: 'https://huggingface.co/comfyanonymous/cosmos_1.0_text_encoder_and_VAE_ComfyUI/resolve/main/vae/cosmos_cv8x8x8_1.0.safetensors',filename: 'cosmos_cv8x8x8_1.0.safetensors', subfolder: 'vae', sizeGB: 0.3,},],diff --git a/src/components/layout/DownloadBadge.tsx b/src/components/layout/DownloadBadge.tsxindex 30f122a4..f5ba60f3 100644--- a/src/components/layout/DownloadBadge.tsx+++ b/src/components/layout/DownloadBadge.tsx@@ -26,7 +26,7 @@ export function DownloadBadge() {// ComfyUI (image/video) entries — group by bundleconst comfyEntries = Object.entries(comfyDownloads).filter(([, d]) =>- d.status === 'downloading' || d.status === 'connecting' || d.status === 'pausing' || d.status === 'paused' || d.status === 'complete'+ d.status === 'downloading' || d.status === 'connecting' || d.status === 'pausing' || d.status === 'paused' || d.status === 'complete' || d.status === 'error')const comfyActiveCount = comfyEntries.filter(([, d]) => d.status === 'downloading' || d.status === 'connecting').length@@ -195,6 +195,7 @@ export function DownloadBadge() {<span className="truncate flex-1 font-mono">{d.filename || id}</span><span className="shrink-0 ml-2">{d.status === 'complete' ? <span className="text-green-400">Done</span>+ : d.status === 'error' ? <span className="text-red-400" title={d.error}>Error</span>: d.status === 'paused' ? <span className="text-yellow-400">Paused</span>: d.total > 0 ? `${Math.round((d.progress / d.total) * 100)}%`: d.status === 'connecting' ? 'Connecting' : '...'}diff --git a/src/components/models/DiscoverModels.tsx b/src/components/models/DiscoverModels.tsxindex 36067589..8fef23f1 100644--- a/src/components/models/DiscoverModels.tsx+++ b/src/components/models/DiscoverModels.tsx@@ -1,7 +1,7 @@import { useState, useEffect, useRef } from 'react'import { motion } from 'framer-motion'import { Download, RefreshCw, ExternalLink, Search, Info, CheckCircle, XCircle, Loader2 } from 'lucide-react'-import { Pause, Play, X } from 'lucide-react'+import { X } from 'lucide-react'import {fetchAbliteratedModels, searchOllamaModels, searchHuggingFaceModels,getImageBundles, getVideoBundles,@@ -153,20 +153,7 @@ function ModelDiscoverCard({ model, index, isText, getModelDownloadState, pullMo)}</div>- {isDownloading && dlState && (- <div className="mt-2 space-y-1">- <ProgressBar progress={dlState.total > 0 ? (dlState.progress / dlState.total) * 100 : 0} />- <div className="flex items-center justify-between text-[10px] text-gray-400">- <span>{dlState.total > 0 ? `${formatBytes(dlState.progress)} / ${formatBytes(dlState.total)}` : 'Connecting...'}</span>- {dlState.speed > 0 && <span>{formatBytes(dlState.speed)}/s</span>}- </div>- </div>- )}- {isError && dlState && (- <div className="mt-1 flex items-center gap-1 text-[10px] text-red-500">- <XCircle size={10} /> {dlState.error || 'Download failed'}- </div>- )}+ {/* Download progress shown exclusively in DownloadBadge (header) */}</div><div className="flex items-center gap-1 shrink-0">@@ -341,6 +328,7 @@ export function DiscoverModels({ category }: Props) {}const [installingBundle, setInstallingBundle] = useState<string | null>(null)+ const [installError, setInstallError] = useState<string | null>(null)const handleBundleInstall = async (bundle: ModelBundle) => {setInstallingBundle(bundle.name)@@ -352,19 +340,19 @@ export function DiscoverModels({ category }: Props) {}}dlStore.getState().setBundleGroup(bundle.name, filenames)+ // Start polling BEFORE install so progress is tracked immediately+ dlStore.getState().startPolling()try {await installBundleComplete(bundle)} catch (err) {console.error('[DiscoverModels] Bundle install failed:', err)+ setInstallError(`${bundle.name}: ${err instanceof Error ? err.message : String(err)}`)}- dlStore.getState().startPolling()- setInstallingBundle(null)+ // Keep installingBundle set until polling confirms downloads are active+ // (small delay to let first poll complete)+ setTimeout(() => setInstallingBundle(null), 1500)}- const handlePause = async (id: string) => { await dlStore.getState().pause(id) }- const handleCancel = async (id: string) => { await dlStore.getState().cancel(id) }- const handleResume = async (id: string) => { await dlStore.getState().resume(id) }-const handleCivitaiSearch = async () => {if (!civitaiQuery.trim()) returnsetCivitaiSearching(true)@@ -459,13 +447,18 @@ export function DiscoverModels({ category }: Props) {const handleHfDownload = async (model: DiscoverModel) => {if (!model.downloadUrl || !model.filename) returnconst destDir = hfModelPath || (await detectProviderModelPath(providers.openai?.name || 'fallback'))- if (!destDir) return+ if (!destDir) {+ setInstallError('No model directory found. Install LM Studio or configure an OpenAI-compatible provider with a local model path first.')+ return+ }setHfModelPath(destDir)try {+ dlStore.getState().setMeta(model.filename, model.downloadUrl, 'gguf')await startModelDownloadToPath(model.downloadUrl, destDir, model.filename)dlStore.getState().startPolling()} catch (e) {console.error('HF download failed:', e)+ setInstallError(`Download failed: ${e instanceof Error ? e.message : String(e)}`)}}@@ -521,45 +514,7 @@ export function DiscoverModels({ category }: Props) {/></div>- {/* Download Manager */}- {Object.values(downloads).some(d => d.status === 'downloading' || d.status === 'connecting' || d.status === 'pausing' || d.status === 'paused') && (- <GlassCard className="p-3 space-y-2">- <h3 className="text-sm font-medium text-gray-900 dark:text-white flex items-center gap-2">- <Loader2 size={14} className={Object.values(downloads).some(d => d.status === 'downloading') ? 'animate-spin' : ''} /> Downloads- </h3>- {Object.entries(downloads).filter(([, d]) => d.status === 'downloading' || d.status === 'connecting' || d.status === 'pausing' || d.status === 'paused').map(([id, d]) => (- <div key={id} className="space-y-1">- <div className="flex items-center justify-between text-xs text-gray-500">- <span className="truncate flex-1">{d.filename}</span>- <div className="flex items-center gap-2 shrink-0">- <span>- {d.status === 'paused' ? 'Paused' : d.status === 'pausing' ? 'Pausing...' : d.total > 0 ? `${formatBytes(d.progress)} / ${formatBytes(d.total)}` : 'Connecting...'}- {d.speed > 0 && d.status === 'downloading' && ` · ${formatBytes(d.speed)}/s`}- </span>- {/* Pause/Resume button */}- {(d.status === 'downloading' || d.status === 'connecting') && (- <button onClick={() => handlePause(id)} className="p-1 rounded hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 hover:text-yellow-500 transition-colors" title="Pause" aria-label="Pause">- <Pause size={12} />- </button>- )}- {d.status === 'paused' && (- <button onClick={() => handleResume(id)} className="p-1 rounded hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 hover:text-green-500 transition-colors" title="Resume" aria-label="Resume">- <Play size={12} />- </button>- )}- {/* Cancel button */}- <button onClick={() => handleCancel(id)} className="p-1 rounded hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 hover:text-red-500 transition-colors" title="Cancel" aria-label="Cancel">- <X size={12} />- </button>- </div>- </div>- {d.total > 0 && <ProgressBar progress={(d.progress / d.total) * 100} />}- </div>- ))}- </GlassCard>- )}-- {/* Download progress moved to DownloadBadge in Header */}+ {/* All download progress is shown exclusively in the DownloadBadge (header) */}{!isText && (<p className="text-[0.65rem] text-gray-500">@@ -618,6 +573,17 @@ export function DiscoverModels({ category }: Props) {</div>)}+ {/* Install error banner */}+ {installError && (+ <div className="flex items-center gap-2 p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 text-sm">+ <XCircle size={16} className="shrink-0" />+ <span className="flex-1">{installError}</span>+ <button onClick={() => setInstallError(null)} className="text-red-400 hover:text-red-300 shrink-0">+ <X size={14} />+ </button>+ </div>+ )}+{/* Model Bundles (Image + Video) — same grid style as text models */}{(isImage || isVideo) && filteredBundles.length > 0 && (<div className="grid grid-cols-1 md:grid-cols-2 gap-3">@@ -652,12 +618,7 @@ export function DiscoverModels({ category }: Props) {)}</div>- {downloading && (- <div className="mt-2">- <ProgressBar progress={bundleProgress} />- <p className="text-[10px] text-gray-400 mt-0.5">{Math.round(bundleProgress)}%</p>- </div>- )}+ {/* Progress shown exclusively in DownloadBadge (header) */}</div><div className="flex items-center gap-1 shrink-0">diff --git a/src/stores/downloadStore.ts b/src/stores/downloadStore.tsindex ad9a01ca..e78e302d 100644--- a/src/stores/downloadStore.ts+++ b/src/stores/downloadStore.ts@@ -16,12 +16,20 @@ interface DownloadStoreState {stopPolling: () => voidsetMeta: (filename: string, url: string, subfolder: string) => voidsetBundleGroup: (bundleName: string, filenames: string[]) => void+ markComplete: (filename: string) => voidpause: (id: string) => Promise<void>cancel: (id: string) => Promise<void>resume: (id: string) => Promise<void>dismiss: (id: string) => void}+// Listen for "exists" events from installBundleComplete — mark files as complete immediately+if (typeof window !== 'undefined') {+ window.addEventListener('comfyui-download-exists', ((e: CustomEvent<{ filename: string }>) => {+ useDownloadStore.getState().markComplete(e.detail.filename)+ }) as EventListener)+}+export const useDownloadStore = create<DownloadStoreState>()((set, get) => ({downloads: {},downloadMeta: {},@@ -82,6 +90,15 @@ export const useDownloadStore = create<DownloadStoreState>()((set, get) => ({})},+ markComplete: (filename: string) => {+ set(s => ({+ downloads: {+ ...s.downloads,+ [filename]: { progress: 1, total: 1, speed: 0, filename, status: 'complete' },+ },+ }))+ },+pause: async (id: string) => {await pauseDownload(id)await get().refresh()diff --git a/vite.config.ts b/vite.config.tsindex d71dafbe..2e66b940 100644--- a/vite.config.ts+++ b/vite.config.ts@@ -396,12 +396,14 @@ function comfyLauncher(): Plugin {res.end(JSON.stringify({ error: 'ComfyUI not found' }))return}- const destDir = join(comfyPath, 'models', subfolder)+ const destDir = subfolder.startsWith('custom_nodes/') || subfolder.startsWith('custom_nodes\\')+ ? join(comfyPath, subfolder)+ : join(comfyPath, 'models', subfolder)const destPath = join(destDir, filename)if (existsSync(destPath)) {res.writeHead(200, { 'Content-Type': 'application/json' })- res.end(JSON.stringify({ status: 'already_exists', id: filename }))+ res.end(JSON.stringify({ status: 'exists', id: filename }))return}@@ -431,6 +433,75 @@ function comfyLauncher(): Plugin {res.end(JSON.stringify(downloads))})+ // API: Detect model path for non-Ollama providers (LM Studio, etc.)+ server.middlewares.use('/local-api/detect-model-path', (req, res) => {+ if (req.method !== 'POST') { res.writeHead(405); res.end(); return }+ let body = ''+ req.on('data', (c: any) => { body += c })+ req.on('end', () => {+ try {+ const { provider } = JSON.parse(body)+ // Try common paths for LM Studio / other providers+ const { existsSync } = require('fs')+ const { join } = require('path')+ const home = require('os').homedir()+ const candidates = [+ join(home, '.cache', 'lm-studio', 'models'),+ join(home, 'AppData', 'Local', 'LM Studio', 'models'),+ join(home, '.local', 'share', 'lm-studio', 'models'),+ ]+ const found = candidates.find(p => existsSync(p))+ if (found) {+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify(found))+ } else {+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify(null))+ }+ } catch {+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify(null))+ }+ })+ })++ // API: Download model to a specific path (for HuggingFace GGUF → LM Studio etc.)+ server.middlewares.use('/local-api/download-model-to-path', (req, res) => {+ if (req.method !== 'POST') { res.writeHead(405); res.end(); return }+ let body = ''+ req.on('data', (c: any) => { body += c })+ req.on('end', () => {+ try {+ const parsed = JSON.parse(body)+ const url = parsed.url+ const destDir = parsed.destDir || parsed.dest_dir+ const filename = parsed.filename+ if (!url || !destDir || !filename) {+ res.writeHead(400, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ error: 'Missing url, destDir, or filename' }))+ return+ }+ const { existsSync, mkdirSync } = require('fs')+ const { join } = require('path')+ if (!existsSync(destDir)) mkdirSync(destDir, { recursive: true })+ const destPath = join(destDir, filename)+ if (existsSync(destPath)) {+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ status: 'exists', id: filename }))+ return+ }+ const id = filename+ console.log(`[Download] Starting to path: ${filename} → ${destDir}`)+ downloadFile(url, destPath, id).catch(err => console.error(`[Download] Failed: ${err.message}`))+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ status: 'started', id }))+ } catch (err) {+ res.writeHead(500, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ error: String(err) }))+ }+ })+ })+// API: Pause download (dev mode stub — sets status to paused)server.middlewares.use('/local-api/pause-download', (req, res) => {if (req.method !== 'POST') { res.writeHead(405); res.end(); return }@@ -477,6 +548,58 @@ function comfyLauncher(): Plugin {})})+ // API: Install custom node (git clone into ComfyUI/custom_nodes/)+ server.middlewares.use('/local-api/install-custom-node', (req, res) => {+ if (req.method !== 'POST') { res.writeHead(405); res.end(); return }+ let body = ''+ req.on('data', (c: any) => { body += c })+ req.on('end', () => {+ try {+ const _parsed = JSON.parse(body)+ const repo_url = _parsed.repoUrl || _parsed.repo_url+ const node_name = _parsed.nodeName || _parsed.node_name+ const comfyPath = findComfyUI()+ if (!comfyPath) {+ res.writeHead(404, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ error: 'ComfyUI not found. Install ComfyUI first.' }))+ return+ }+ const customNodesDir = join(comfyPath, 'custom_nodes')+ if (!existsSync(customNodesDir)) mkdirSync(customNodesDir, { recursive: true })+ const targetDir = join(customNodesDir, node_name || basename(repo_url, '.git'))+ if (existsSync(targetDir)) {+ console.log(`[CustomNode] Already installed: ${node_name}`)+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ status: 'already_installed', path: targetDir }))+ return+ }+ console.log(`[CustomNode] Installing ${node_name} from ${repo_url}...`)+ try {+ execSync(`git clone "${repo_url}" "${targetDir}"`, { timeout: 120000 })+ // Try pip install if requirements.txt exists+ const reqFile = join(targetDir, 'requirements.txt')+ if (existsSync(reqFile)) {+ try {+ execSync(`pip install -r "${reqFile}"`, { cwd: targetDir, timeout: 300000 })+ } catch (pipErr: any) {+ console.warn(`[CustomNode] pip install failed for ${node_name}:`, pipErr.message)+ }+ }+ console.log(`[CustomNode] Installed: ${node_name}`)+ res.writeHead(200, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ status: 'installed', path: targetDir }))+ } catch (gitErr: any) {+ console.error(`[CustomNode] Git clone failed:`, gitErr.message)+ res.writeHead(500, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ error: `Git clone failed: ${gitErr.message}` }))+ }+ } catch (err) {+ res.writeHead(400, { 'Content-Type': 'application/json' })+ res.end(JSON.stringify({ error: String(err) }))+ }+ })+ })+// API: Set ComfyUI path (writes to .env and starts ComfyUI)server.middlewares.use('/local-api/set-comfyui-path', (req, res) => {if (req.method !== 'POST') { res.writeHead(405); res.end(); return }