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: Tauri .exe download overhaul — camelCase params, retry, external links, full bundle audit

PurpleDoubleDfb70f82c4ce3
diff --git a/CLAUDE.md b/CLAUDE.md
index d63c7a7d..59935d25 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -50,9 +50,22 @@ src-tauri/src/commands/ — Rust commands: install, process, download, prox
20. **isInstalled prefix-match** — Ollama models without tag (hermes3) match installed variants (hermes3:8b)
21. **All 3 download flows Tauri-verified** — Ollama pull (events), HF GGUF (invoke), ComfyUI bundles (invoke) — all arg mappings, command registrations, progress polling confirmed
+22. **Tauri .exe download fix (camelCase)** — Rust commands used snake_case params but JS sent camelCase. Downloads silently failed in .exe, worked in dev. Fixed: download_model, download_model_to_path, install_custom_node all use camelCase params now.
+23. **Retry button for failed downloads** — per-file retry in DownloadBadge + bundle-level retry in DiscoverModels. Only retries failed files, not completed ones.
+24. **Download speed display** — MB/s shown per file and per bundle in DownloadBadge
+25. **External links open system browser** — all `target="_blank"` links replaced with `openExternal()` via Tauri shell plugin. Added `shell:allow-open` capability.
+26. **Bundle installed detection fixed** — error files no longer count as "complete", bundleStatuses refresh after download, 50% threshold for check_model_sizes (sizeGB values are estimates)
+27. **LM Studio not auto-started** — openai provider default changed to `enabled: false`, only activated if detectLocalBackends finds it
+28. **Download polling race fix** — first download after app restart now shows immediately (min 5 poll cycles before auto-stop)
+29. **All 20 bundle file sizes verified** — 13 files had wrong sizeGB values (up to 95% off), all corrected against real Content-Length
+30. **Mochi missing T5-XXL** — text encoder was completely missing from bundle, model would fail at CLIPLoader. Added as 3rd file.
+31. **AnimateDiff v3 wrong file** — was downloading adapter (97 MB) instead of motion model (1.6 GB). Fixed URL to v3_sd15_mm.ckpt
+32. **Onboarding typo** — `qwen2.5-abliterated` doesn't exist on Ollama, fixed to `qwen2.5-abliterate`
+33. **All 30 Ollama models verified**, all 24 HF GGUF URLs verified, all 20 ComfyUI bundle URLs verified
+
### What's LEFT to finish v2.3.0:
-1. **E2E per-model verification** — every single model in Discover (Text/Image/Video) must be tested: download starts, progress shows, file lands on disk at correct path with correct size. Partial downloads must trigger re-download, not false "exists".
-2. **Tauri .exe E2E** — run the built .exe (not dev server), test all 3 download flows end-to-end in production mode
+1. **Tauri .exe E2E** — run the built .exe (not dev server), test all 3 download flows end-to-end in production mode
+2. **HuggingFace as primary download source** — replace Ollama-only text downloads with HF GGUF for all providers (LM Studio compatibility). Auto-detect provider model directory.
### 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
@@ -74,21 +87,28 @@ src-tauri/src/commands/ — Rust commands: install, process, download, prox
17. **handleRefresh race condition** — loading flag was cleared before async detectProviderModelPath resolved
18. **Dev-mode fetchModels try-catch** — pullModel completion in dev mode could crash if Ollama stopped during fetchModels
-### Files modified in this branch (23+ files):
+### Files modified in this branch (30+ files):
- `src/api/comfyui.ts` — 7 new ModelTypes, COMPONENT_REGISTRY, uploadImage(), inputImage in VideoParams
- `src/api/dynamic-workflow.ts` — 7 new strategies, 5 wrapper builders, inputImage support in SVD/FramePack
- `src/api/comfyui-nodes.ts` — 30+ new nodes in categorization mapping
-- `src/api/discover.ts` — 14 video + 6 image bundles, CUSTOM_NODE_REGISTRY, installBundleComplete(), uncensored flags
-- `src/api/backend.ts` — install_custom_node endpoint mapping
+- `src/api/discover.ts` — 14 video + 6 image bundles, CUSTOM_NODE_REGISTRY, installBundleComplete(), uncensored flags, ALL sizeGB verified
+- `src/api/backend.ts` — install_custom_node endpoint mapping, openExternal() for system browser
- `src/api/preflight.ts` — extended needsUnet check for all new model types
-- `src-tauri/src/commands/install.rs` — install_custom_node command
-- `src-tauri/src/commands/download.rs` — download_model with resume, progress, speed tracking
+- `src-tauri/src/commands/install.rs` — install_custom_node command (camelCase params)
+- `src-tauri/src/commands/download.rs` — download_model with resume, progress, speed tracking (camelCase params), 50% threshold for check_model_sizes
- `src-tauri/src/main.rs` — registered install_custom_node
+- `src-tauri/capabilities/default.json` — added shell:allow-open for external links
- `src/components/create/CreateView.tsx` — I2V upload UI (drag & drop, preview, replace/remove)
-- `src/components/layout/DownloadBadge.tsx` — unified: text + ComfyUI downloads, bundle grouping
-- `src/components/models/DiscoverModels.tsx` — VRAM tier tabs, downloadStore integration, installBundleComplete, isInstalled fix
-- `src/components/onboarding/Onboarding.tsx` — comfyui step, drag region, accent dots, VRAM filtering, tool calling badges, re-scan
+- `src/components/create/WorkflowSearchModal.tsx` — openExternal for CivitAI link
+- `src/components/create/WorkflowCard.tsx` — openExternal for source links
+- `src/components/chat/MarkdownRenderer.tsx` — openExternal for all chat links
+- `src/components/layout/DownloadBadge.tsx` — unified: text + ComfyUI downloads, bundle grouping, retry buttons, speed display
+- `src/components/models/DiscoverModels.tsx` — VRAM tier tabs, downloadStore integration, retry for failed bundles, openExternal, no double "Installed"
+- `src/components/onboarding/Onboarding.tsx` — comfyui step, drag region, accent dots, VRAM filtering, tool calling badges, re-scan, openExternal
- `src/components/settings/SettingsPage.tsx` — ComfyUISettings component
+- `src/stores/providerStore.ts` — LM Studio default disabled (auto-detect only)
+- `src/stores/updateStore.ts` — openExternal for release page
+- `src/lib/constants.ts` — OnboardingModel: vramGB, uncensored, agent fields, qwen2.5-abliterate typo fix
- `src/hooks/useCreate.ts` — i2vImage pass-through to workflow builder
- `src/lib/constants.ts` — OnboardingModel: vramGB, uncensored, agent fields + mainstream models
- `src/stores/createStore.ts` — i2vImage state
diff --git a/package-lock.json b/package-lock.json
index 7d904afc..0a435fe8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,17 +1,18 @@
{
"name": "locally-uncensored",
- "version": "2.0.0",
+ "version": "2.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "locally-uncensored",
- "version": "2.0.0",
+ "version": "2.2.3",
"license": "MIT",
"dependencies": {
"@react-three/drei": "^10.7.7",
"@react-three/fiber": "^9.5.0",
"@tailwindcss/vite": "^4.2.2",
+ "@tauri-apps/plugin-shell": "^2.3.5",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/uuid": "^10.0.0",
"dotenv": "^17.3.1",
@@ -1489,7 +1490,6 @@
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz",
"integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==",
- "dev": true,
"license": "Apache-2.0 OR MIT",
"funding": {
"type": "opencollective",
@@ -1713,6 +1713,15 @@
"node": ">= 10"
}
},
+ "node_modules/@tauri-apps/plugin-shell": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.3.5.tgz",
+ "integrity": "sha512-jewtULhiQ7lI7+owCKAjc8tYLJr92U16bPOeAa472LHJdgaibLP83NcfAF2e+wkEcA53FxKQAZ7byDzs2eeizg==",
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "@tauri-apps/api": "^2.10.1"
+ }
+ },
"node_modules/@tweenjs/tween.js": {
"version": "23.1.3",
"resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",
diff --git a/package.json b/package.json
index 1fe15afb..124786d1 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
"@react-three/drei": "^10.7.7",
"@react-three/fiber": "^9.5.0",
"@tailwindcss/vite": "^4.2.2",
+ "@tauri-apps/plugin-shell": "^2.3.5",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/uuid": "^10.0.0",
"dotenv": "^17.3.1",
diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json
index f8d131f4..f0a99961 100644
--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -15,6 +15,7 @@
"core:webview:default",
"shell:allow-spawn",
"shell:allow-stdin-write",
- "shell:allow-kill"
+ "shell:allow-kill",
+ "shell:allow-open"
]
}
diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json
index dbd0c881..82f12b4d 100644
--- a/src-tauri/gen/schemas/capabilities.json
+++ b/src-tauri/gen/schemas/capabilities.json
@@ -1 +1 @@
-{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:window:default","core:window:allow-minimize","core:window:allow-maximize","core:window:allow-unmaximize","core:window:allow-close","core:window:allow-is-maximized","core:window:allow-toggle-maximize","core:webview:default","shell:allow-spawn","shell:allow-stdin-write","shell:allow-kill"]}}
\ No newline at end of file
+{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:window:default","core:window:allow-minimize","core:window:allow-maximize","core:window:allow-unmaximize","core:window:allow-close","core:window:allow-is-maximized","core:window:allow-toggle-maximize","core:webview:default","shell:allow-spawn","shell:allow-stdin-write","shell:allow-kill","shell:allow-open"]}}
\ No newline at end of file
diff --git a/src-tauri/src/commands/download.rs b/src-tauri/src/commands/download.rs
index 28d31cc7..e9c595e0 100644
--- a/src-tauri/src/commands/download.rs
+++ b/src-tauri/src/commands/download.rs
@@ -22,14 +22,16 @@ fn models_dir(comfy_path: &Option<String>, subfolder: &str) -> Result<PathBuf, S
Ok(dir)
}
+#[allow(non_snake_case)]
#[tauri::command]
pub async fn download_model(
url: String,
subfolder: String,
filename: String,
- expected_bytes: Option<u64>,
+ expectedBytes: Option<u64>,
state: State<'_, AppState>,
) -> Result<serde_json::Value, String> {
+ let expected_bytes = expectedBytes;
let comfy_path = {
let mut p = state.comfy_path.lock().unwrap();
if p.is_none() {
@@ -487,14 +489,17 @@ pub fn detect_model_path(provider: String) -> Result<serde_json::Value, String>
Ok(serde_json::json!(fallback.to_string_lossy()))
}
+#[allow(non_snake_case)]
#[tauri::command]
pub async fn download_model_to_path(
url: String,
- dest_dir: String,
+ destDir: String,
filename: String,
- expected_bytes: Option<u64>,
+ expectedBytes: Option<u64>,
state: State<'_, AppState>,
) -> Result<serde_json::Value, String> {
+ let dest_dir = destDir;
+ let expected_bytes = expectedBytes;
let dir = PathBuf::from(&dest_dir);
fs::create_dir_all(&dir).map_err(|e| format!("Create dest dir: {}", e))?;
let dest_file = dir.join(&filename);
@@ -633,8 +638,11 @@ pub async fn check_model_sizes(
let dest_file = dest_dir.join(&file.filename);
if dest_file.exists() {
let actual = dest_file.metadata().map(|m| m.len()).unwrap_or(0);
+ // Use 50% threshold for install checks — sizeGB values are rough estimates
+ // (e.g. sizeGB: 0.9 for an 800 MB file). The 90% check in download_model
+ // handles partial downloads; this check just validates the file isn't empty/tiny.
let threshold = if file.expected_bytes > 0 {
- (file.expected_bytes as f64 * 0.9) as u64
+ (file.expected_bytes as f64 * 0.5) as u64
} else {
0
};
diff --git a/src-tauri/src/commands/install.rs b/src-tauri/src/commands/install.rs
index 10cad5a0..72b44373 100644
--- a/src-tauri/src/commands/install.rs
+++ b/src-tauri/src/commands/install.rs
@@ -122,12 +122,15 @@ pub fn install_comfyui_status(state: State<'_, AppState>) -> Result<serde_json::
}))
}
+#[allow(non_snake_case)]
#[tauri::command]
pub fn install_custom_node(
state: State<'_, AppState>,
- repo_url: String,
- node_name: String,
+ repoUrl: String,
+ nodeName: String,
) -> Result<serde_json::Value, String> {
+ let repo_url = repoUrl;
+ let node_name = nodeName;
// Find ComfyUI path from state
let comfy_path = {
let path = state.comfy_path.lock().unwrap();
diff --git a/src/api/backend.ts b/src/api/backend.ts
index 13b27bdd..6f678f76 100644
--- a/src/api/backend.ts
+++ b/src/api/backend.ts
@@ -270,3 +270,19 @@ export async function fetchExternalBytes(url: string): Promise<ArrayBuffer> {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.arrayBuffer();
}
+
+/** Open a URL in the system's default browser (works in both dev and Tauri) */
+export async function openExternal(url: string): Promise<void> {
+ if (isTauri()) {
+ // Use Tauri's invoke to open URL in system browser via shell plugin
+ const invoke = await getInvoke()
+ try {
+ await invoke('plugin:shell|open', { path: url })
+ } catch {
+ // Fallback if plugin command format differs
+ window.open(url, '_blank')
+ }
+ } else {
+ window.open(url, '_blank')
+ }
+}
diff --git a/src/api/discover.ts b/src/api/discover.ts
index 89f6d3cf..ff611196 100644
--- a/src/api/discover.ts
+++ b/src/api/discover.ts
@@ -597,7 +597,7 @@ export function getImageBundles(): ModelBundle[] {
description: 'Great for portraits, landscapes, and product photos. Ready to use.',
tags: ['SDXL', 'Photorealistic', '1024px'],
uncensored: true,
- totalSizeGB: 3.5,
+ totalSizeGB: 6.5,
vramRequired: '6-8 GB',
workflow: 'sdxl',
url: 'https://huggingface.co/SG161222/RealVisXL_V5.0',
@@ -605,9 +605,9 @@ export function getImageBundles(): ModelBundle[] {
{
name: 'RealVisXL V5 FP16',
description: 'SDXL checkpoint — includes VAE and CLIP.',
- pulls: '', tags: ['Checkpoint', '3.5 GB'], updated: '',
+ pulls: '', tags: ['Checkpoint', '6.5 GB'], updated: '',
downloadUrl: 'https://huggingface.co/SG161222/RealVisXL_V5.0/resolve/main/RealVisXL_V5.0_fp16.safetensors',
- filename: 'RealVisXL_V5.safetensors', subfolder: 'checkpoints', sizeGB: 3.5,
+ filename: 'RealVisXL_V5.safetensors', subfolder: 'checkpoints', sizeGB: 6.5,
},
],
},
@@ -616,7 +616,7 @@ export function getImageBundles(): ModelBundle[] {
description: 'State-of-the-art image gen. 1-4 steps for fast results. Complete package with all required encoders.',
tags: ['FLUX', 'Fast', 'FP8', '1024px'],
hot: true,
- totalSizeGB: 16,
+ totalSizeGB: 21,
vramRequired: '8-10 GB',
workflow: 'flux',
url: 'https://huggingface.co/Comfy-Org/flux1-schnell',
@@ -624,9 +624,9 @@ export function getImageBundles(): ModelBundle[] {
{
name: 'FLUX.1 schnell FP8',
description: 'The main FLUX diffusion model (quantized).',
- pulls: '', tags: ['Model', '11.5 GB'], updated: '',
+ pulls: '', tags: ['Model', '16 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell-fp8.safetensors',
- filename: 'flux1-schnell-fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 11.5,
+ filename: 'flux1-schnell-fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 16.1,
},
{
name: 'FLUX VAE',
@@ -655,7 +655,7 @@ export function getImageBundles(): ModelBundle[] {
name: 'FLUX.1 [dev] FP8 (High Quality)',
description: 'Highest quality FLUX. More steps but better results. Complete package with all required encoders.',
tags: ['FLUX', 'Quality', 'FP8', '1024px'],
- totalSizeGB: 16,
+ totalSizeGB: 21,
vramRequired: '8-10 GB',
workflow: 'flux',
url: 'https://huggingface.co/Comfy-Org/flux1-dev',
@@ -663,9 +663,9 @@ export function getImageBundles(): ModelBundle[] {
{
name: 'FLUX.1 dev FP8',
description: 'The main FLUX diffusion model (dev, quantized).',
- pulls: '', tags: ['Model', '11.5 GB'], updated: '',
+ pulls: '', tags: ['Model', '16 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors',
- filename: 'flux1-dev-fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 11.5,
+ filename: 'flux1-dev-fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 16.1,
},
{
name: 'FLUX VAE',
@@ -695,7 +695,7 @@ export function getImageBundles(): ModelBundle[] {
description: 'Latest FLUX architecture. Fastest FLUX model with stunning quality. Includes Qwen 3 text encoder.',
tags: ['FLUX 2', 'Fast', '1024px'],
hot: true,
- totalSizeGB: 8,
+ totalSizeGB: 11.1,
vramRequired: '8-10 GB',
workflow: 'flux2',
url: 'https://huggingface.co/Comfy-Org/vae-text-encorder-for-flux-klein-4b',
@@ -703,9 +703,9 @@ export function getImageBundles(): ModelBundle[] {
{
name: 'FLUX 2 Klein Base 4B',
description: 'FLUX 2 Klein diffusion model — next-gen image generation.',
- pulls: '', tags: ['Diffusion Model', '~4 GB'], updated: 'New',
+ pulls: '', tags: ['Diffusion Model', '7.2 GB'], updated: 'New',
downloadUrl: 'https://huggingface.co/Comfy-Org/vae-text-encorder-for-flux-klein-4b/resolve/main/split_files/diffusion_models/flux-2-klein-base-4b.safetensors',
- filename: 'flux-2-klein-base-4b.safetensors', subfolder: 'diffusion_models', sizeGB: 4,
+ filename: 'flux-2-klein-base-4b.safetensors', subfolder: 'diffusion_models', sizeGB: 7.2,
},
{
name: 'FLUX 2 VAE',
@@ -819,7 +819,7 @@ export function getVideoBundles(): ModelBundle[] {
tags: ['Wan 2.1', '480p', 'Fast'],
hot: true,
uncensored: true,
- totalSizeGB: 7.6,
+ totalSizeGB: 9.2,
vramRequired: '8-10 GB',
workflow: 'wan',
url: 'https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged',
@@ -843,7 +843,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Required text encoder.',
pulls: '', tags: ['CLIP', '4.9 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors',
- filename: 'umt5_xxl_fp8_e4m3fn_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 4.9,
+ filename: 'umt5_xxl_fp8_e4m3fn_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 6.3,
},
],
},
@@ -852,7 +852,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Best quality for 12+ GB VRAM. Generates up to 720p. Slower but much better results.',
tags: ['Wan 2.1', '720p', 'Quality'],
uncensored: true,
- totalSizeGB: 19.1,
+ totalSizeGB: 20.5,
vramRequired: '12+ GB',
workflow: 'wan',
url: 'https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged',
@@ -876,7 +876,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Required text encoder.',
pulls: '', tags: ['CLIP', '4.9 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors',
- filename: 'umt5_xxl_fp8_e4m3fn_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 4.9,
+ filename: 'umt5_xxl_fp8_e4m3fn_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 6.3,
},
],
},
@@ -885,7 +885,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Tencent HunyuanVideo 1.5 — excellent temporal consistency and visual quality. 480p text-to-video with CFG distillation.',
tags: ['HunyuanVideo 1.5', '480p', 'Quality'],
uncensored: true,
- totalSizeGB: 21.5,
+ totalSizeGB: 18.8,
vramRequired: '12+ GB',
workflow: 'hunyuan',
url: 'https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged',
@@ -893,16 +893,16 @@ export function getVideoBundles(): ModelBundle[] {
{
name: 'HunyuanVideo 1.5 T2V FP8',
description: 'The main video generation model (480p, CFG distilled, quantized).',
- pulls: '', tags: ['Model', '13.2 GB'], updated: '',
+ pulls: '', tags: ['Model', '7.8 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_480p_t2v_cfg_distilled_fp8_scaled.safetensors',
- filename: 'hunyuanvideo1.5_480p_t2v_fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 13.2,
+ filename: 'hunyuanvideo1.5_480p_t2v_fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 7.8,
},
{
name: 'HunyuanVideo 1.5 VAE',
description: 'Required video encoder/decoder.',
- pulls: '', tags: ['VAE', '490 MB'], updated: '',
+ pulls: '', tags: ['VAE', '2.3 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/vae/hunyuanvideo15_vae_fp16.safetensors',
- filename: 'hunyuanvideo15_vae_fp16.safetensors', subfolder: 'vae', sizeGB: 0.5,
+ filename: 'hunyuanvideo15_vae_fp16.safetensors', subfolder: 'vae', sizeGB: 2.3,
},
{
name: 'Qwen 2.5 VL 7B Text Encoder (FP8)',
@@ -924,7 +924,7 @@ export function getVideoBundles(): ModelBundle[] {
name: 'LTX Video 2.3 — 22B FP8 (Latest)',
description: 'Lightricks LTX Video 2.3 — fast inference, high quality. Uses Gemma 3 12B text encoder. Distilled for speed.',
tags: ['LTX 2.3', '22B', 'Quality'],
- totalSizeGB: 35,
+ totalSizeGB: 40,
vramRequired: '16+ GB',
workflow: 'ltx',
url: 'https://huggingface.co/Lightricks/LTX-2.3-fp8',
@@ -934,7 +934,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Main video model — distilled for fast inference.',
pulls: '', tags: ['Model', '~22 GB'], updated: 'New',
downloadUrl: 'https://huggingface.co/Lightricks/LTX-2.3-fp8/resolve/main/ltx-2.3-22b-distilled-fp8.safetensors',
- filename: 'ltx-2.3-22b-distilled-fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 22,
+ filename: 'ltx-2.3-22b-distilled-fp8.safetensors', subfolder: 'diffusion_models', sizeGB: 27.5,
},
{
name: 'Gemma 3 12B Text Encoder (FP8)',
@@ -951,7 +951,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Ultra-fast 4-step animation on any SD1.5 checkpoint. Great for quick iterations. Needs an SD1.5 base model.',
tags: ['AnimateDiff', '512x512', 'Lightning'],
hot: true,
- totalSizeGB: 2.4,
+ totalSizeGB: 2.8,
vramRequired: '6-8 GB',
workflow: 'animatediff',
customNodes: ['animatediff-evolved'],
@@ -960,9 +960,9 @@ export function getVideoBundles(): ModelBundle[] {
{
name: 'AnimateDiff Lightning Motion Model (4-step)',
description: 'Lightning-fast motion model — only 4 sampling steps needed.',
- pulls: '', tags: ['Motion', '400 MB'], updated: '',
+ pulls: '', tags: ['Motion', '800 MB'], updated: '',
downloadUrl: 'https://huggingface.co/ByteDance/AnimateDiff-Lightning/resolve/main/animatediff_lightning_4step_comfyui.safetensors',
- filename: 'animatediff_lightning_4step_comfyui.safetensors', subfolder: 'custom_nodes/ComfyUI-AnimateDiff-Evolved/models', sizeGB: 0.4,
+ filename: 'animatediff_lightning_4step_comfyui.safetensors', subfolder: 'custom_nodes/ComfyUI-AnimateDiff-Evolved/models', sizeGB: 0.8,
},
{
name: 'Realistic Vision V6 (SD1.5 Base)',
@@ -977,7 +977,7 @@ export function getVideoBundles(): ModelBundle[] {
name: 'AnimateDiff v3',
description: 'Classic AnimateDiff with more frames and better quality than Lightning. Slower but more detailed.',
tags: ['AnimateDiff', '512x768', 'Quality'],
- totalSizeGB: 3.8,
+ totalSizeGB: 3.6,
vramRequired: '6-8 GB',
workflow: 'animatediff',
customNodes: ['animatediff-evolved'],
@@ -986,9 +986,9 @@ export function getVideoBundles(): ModelBundle[] {
{
name: 'AnimateDiff v3 Motion Adapter',
description: 'Standard motion model — 20 steps, good quality.',
- pulls: '', tags: ['Motion', '1.8 GB'], updated: '',
- downloadUrl: 'https://huggingface.co/guoyww/animatediff/resolve/main/v3_sd15_adapter.ckpt',
- filename: 'v3_sd15_adapter.ckpt', subfolder: 'custom_nodes/ComfyUI-AnimateDiff-Evolved/models', sizeGB: 1.8,
+ pulls: '', tags: ['Motion', '1.6 GB'], updated: '',
+ downloadUrl: 'https://huggingface.co/guoyww/animatediff/resolve/main/v3_sd15_mm.ckpt',
+ filename: 'v3_sd15_mm.ckpt', subfolder: 'custom_nodes/ComfyUI-AnimateDiff-Evolved/models', sizeGB: 1.6,
},
{
name: 'Realistic Vision V6 (SD1.5 Base)',
@@ -1074,7 +1074,7 @@ export function getVideoBundles(): ModelBundle[] {
tags: ['FramePack', 'I2V', 'Low VRAM'],
hot: true,
uncensored: true,
- totalSizeGB: 19.3,
+ totalSizeGB: 27.0,
vramRequired: '6-8 GB',
workflow: 'framepack',
i2v: true,
@@ -1098,9 +1098,9 @@ export function getVideoBundles(): ModelBundle[] {
{
name: 'HunyuanVideo VAE',
description: 'Required video encoder/decoder (shared with HunyuanVideo).',
- pulls: '', tags: ['VAE', '490 MB'], updated: '',
+ pulls: '', tags: ['VAE', '2.3 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/vae/hunyuanvideo15_vae_fp16.safetensors',
- filename: 'hunyuanvideo15_vae_fp16.safetensors', subfolder: 'vae', sizeGB: 0.5,
+ filename: 'hunyuanvideo15_vae_fp16.safetensors', subfolder: 'vae', sizeGB: 2.3,
},
{
name: 'CLIP-L Text Encoder',
@@ -1112,9 +1112,9 @@ export function getVideoBundles(): ModelBundle[] {
{
name: 'LLaVA LLaMA3 Text Encoder (FP8)',
description: 'Required text encoder for FramePack.',
- pulls: '', tags: ['Text Encoder', '4.7 GB'], updated: '',
+ pulls: '', tags: ['Text Encoder', '8.5 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/text_encoders/llava_llama3_fp8_scaled.safetensors',
- filename: 'llava_llama3_fp8_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 4.7,
+ filename: 'llava_llama3_fp8_scaled.safetensors', subfolder: 'text_encoders', sizeGB: 8.5,
},
],
},
@@ -1141,7 +1141,7 @@ export function getVideoBundles(): ModelBundle[] {
name: 'Mochi 1 Preview (FP8)',
description: 'Genmo Mochi — 848x480 video at 24 FPS. Good motion and temporal consistency. Native ComfyUI support.',
tags: ['Mochi', '848x480', 'Native'],
- totalSizeGB: 10.3,
+ totalSizeGB: 20.4,
vramRequired: '16+ GB',
workflow: 'mochi',
url: 'https://huggingface.co/Comfy-Org/mochi_preview_repackaged',
@@ -1156,9 +1156,16 @@ export function getVideoBundles(): ModelBundle[] {
{
name: 'Mochi VAE',
description: 'Required video encoder/decoder.',
- pulls: '', tags: ['VAE', '300 MB'], updated: '',
+ pulls: '', tags: ['VAE', '0.9 GB'], updated: '',
downloadUrl: 'https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/vae/mochi_vae.safetensors',
- filename: 'mochi_vae.safetensors', subfolder: 'vae', sizeGB: 0.3,
+ filename: 'mochi_vae.safetensors', subfolder: 'vae', sizeGB: 0.9,
+ },
+ {
+ name: 'T5-XXL Text Encoder (FP16)',
+ description: 'Required text encoder for Mochi.',
+ pulls: '', tags: ['Text Encoder', '9.5 GB'], updated: '',
+ 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,
},
],
},
@@ -1217,7 +1224,7 @@ export function getVideoBundles(): ModelBundle[] {
description: 'Required video encoder/decoder.',
pulls: '', tags: ['VAE', '300 MB'], updated: '',
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,
+ filename: 'cosmos_cv8x8x8_1.0.safetensors', subfolder: 'vae', sizeGB: 0.2,
},
],
},
diff --git a/src/components/chat/MarkdownRenderer.tsx b/src/components/chat/MarkdownRenderer.tsx
index 6f3087f5..040e89ca 100644
--- a/src/components/chat/MarkdownRenderer.tsx
+++ b/src/components/chat/MarkdownRenderer.tsx
@@ -4,6 +4,7 @@ import remarkMath from 'remark-math'
import rehypeKatex from 'rehype-katex'
import 'katex/dist/katex.min.css'
import { CodeBlock } from './CodeBlock'
+import { openExternal } from '../../api/backend'
import type { Components } from 'react-markdown'
interface Props {
@@ -65,9 +66,12 @@ const components: Components = {
},
a({ href, children }) {
return (
- <a href={href} target="_blank" rel="noopener noreferrer" className="text-blue-600 dark:text-blue-400 hover:underline">
+ <button
+ onClick={(e) => { e.preventDefault(); if (href) openExternal(href) }}
+ className="text-blue-600 dark:text-blue-400 hover:underline cursor-pointer inline"
+ >
{children}
- </a>
+ </button>
)
},
}
diff --git a/src/components/create/WorkflowCard.tsx b/src/components/create/WorkflowCard.tsx
index aba61ea6..e161015c 100644
--- a/src/components/create/WorkflowCard.tsx
+++ b/src/components/create/WorkflowCard.tsx
@@ -2,6 +2,7 @@ import { Download, Check, ExternalLink, RotateCcw, Star } from 'lucide-react'
import type { WorkflowSearchResult } from '../../types/workflows'
import type { ModelType } from '../../api/comfyui'
import { proxyImageUrl } from '../../lib/privacy'
+import { openExternal } from '../../api/backend'
interface Props {
result: WorkflowSearchResult
@@ -95,14 +96,12 @@ export function WorkflowCard({ result, isInstalled, isActive, currentModelType,
</button>
)}
{result.sourceUrl && (
- <a
- href={result.sourceUrl}
- target="_blank"
- rel="noopener noreferrer"
+ <button
+ onClick={() => openExternal(result.sourceUrl!)}
className="flex items-center gap-1 px-2 py-1 rounded-lg bg-white/5 hover:bg-white/10 text-gray-400 hover:text-white text-xs transition-colors"
>
<ExternalLink size={12} /> Source
- </a>
+ </button>
)}
</div>
</div>
diff --git a/src/components/create/WorkflowSearchModal.tsx b/src/components/create/WorkflowSearchModal.tsx
index 13a89416..47d4053e 100644
--- a/src/components/create/WorkflowSearchModal.tsx
+++ b/src/components/create/WorkflowSearchModal.tsx
@@ -2,6 +2,7 @@ import { useState, useCallback, useEffect, useRef } from 'react'
import { Search, Upload, Loader2, AlertCircle, Key, Eye, EyeOff } from 'lucide-react'
import { v4 as uuid } from 'uuid'
import { Modal } from '../ui/Modal'
+import { openExternal } from '../../api/backend'
import { WorkflowCard } from './WorkflowCard'
import { useWorkflowStore } from '../../stores/workflowStore'
import {
@@ -424,14 +425,12 @@ export function WorkflowSearchModal({ open, onClose, modelName, modelType }: Pro
<p className="text-xs text-gray-300 leading-relaxed">
CivitAI requires an API key to download workflows. You can create one for free in about a minute:
</p>
- <a
- href="https://civitai.com/user/account"
- target="_blank"
- rel="noopener noreferrer"
+ <button
+ onClick={() => openExternal('https://civitai.com/user/account')}
className="block w-full px-3 py-2 rounded-lg bg-white/10 hover:bg-white/15 border border-white/20 text-white text-sm font-medium text-center transition-colors"
>
Get Free API Key on CivitAI
- </a>
+ </button>
<div>
<label className="text-[10px] font-medium text-gray-500 uppercase tracking-wider mb-1 block">Paste your key here</label>
<div className="relative">
diff --git a/src/components/layout/DownloadBadge.tsx b/src/components/layout/DownloadBadge.tsx
index f5ba60f3..15edddcd 100644
--- a/src/components/layout/DownloadBadge.tsx
+++ b/src/components/layout/DownloadBadge.tsx
@@ -1,6 +1,6 @@
import { useState, useRef, useEffect } from 'react'
import { motion, AnimatePresence } from 'framer-motion'
-import { ArrowDownToLine, Pause, Play, X, CheckCircle } from 'lucide-react'
+import { ArrowDownToLine, Pause, Play, X, CheckCircle, RotateCcw } from 'lucide-react'
import { useModels } from '../../hooks/useModels'
import { useDownloadStore } from '../../stores/downloadStore'
import { formatBytes } from '../../lib/formatters'
@@ -162,6 +162,7 @@ export function DownloadBadge() {
const totalBytes = files.reduce((s, f) => s + f.d.total, 0)
const doneBytes = files.reduce((s, f) => s + f.d.progress, 0)
const bundleProg = totalBytes > 0 ? (doneBytes / totalBytes) * 100 : 0
+ const bundleSpeed = files.reduce((s, f) => s + (f.d.status === 'downloading' ? (f.d.speed || 0) : 0), 0)
const isBundle = files.length > 1
return (
@@ -170,6 +171,9 @@ export function DownloadBadge() {
<div className="flex items-center justify-between gap-2 mb-1">
<p className={`${isBundle ? 'text-[0.7rem] font-medium' : 'text-[0.7rem] font-mono'} text-gray-700 dark:text-gray-300 truncate`}>{bundleName}</p>
<div className="flex items-center gap-0.5 shrink-0">
+ {files.some(f => f.d.status === 'error') && (
+ <button onClick={() => files.filter(f => f.d.status === 'error').forEach(f => useDownloadStore.getState().retry(f.id))} className="p-0.5 rounded hover:bg-red-500/20 text-red-400 hover:text-red-300 transition-colors" title="Retry failed"><RotateCcw size={11} /></button>
+ )}
{allComplete ? (
<button onClick={() => files.forEach(f => useDownloadStore.getState().dismiss(f.id))} className="p-0.5 rounded hover:bg-white/10 text-gray-500 hover:text-gray-300 transition-colors" title="Dismiss"><X size={11} /></button>
) : (
@@ -183,21 +187,44 @@ export function DownloadBadge() {
) : (
<>
{totalBytes > 0 && <ProgressBar progress={bundleProg} />}
- <p className="text-[0.55rem] text-gray-500 mt-0.5">
- {totalBytes > 0 ? `${formatBytes(doneBytes)} / ${formatBytes(totalBytes)}` : 'Starting...'}
- {bundleProg > 0 && <span className="ml-1.5 text-blue-400">{Math.round(bundleProg)}%</span>}
- </p>
+ <div className="flex items-center justify-between mt-0.5">
+ <p className="text-[0.55rem] text-gray-500">
+ {totalBytes > 0 ? `${formatBytes(doneBytes)} / ${formatBytes(totalBytes)}` : 'Starting...'}
+ {bundleProg > 0 && <span className="ml-1.5 text-blue-400">{Math.round(bundleProg)}%</span>}
+ {bundleSpeed > 0 && <span className="ml-1.5 text-gray-400">{formatBytes(bundleSpeed)}/s</span>}
+ </p>
+ {/* Retry all failed files in bundle */}
+ {files.some(f => f.d.status === 'error') && (
+ <button
+ onClick={() => files.filter(f => f.d.status === 'error').forEach(f => useDownloadStore.getState().retry(f.id))}
+ className="flex items-center gap-1 text-[0.55rem] text-red-400 hover:text-red-300 transition-colors"
+ title="Retry failed downloads"
+ >
+ <RotateCcw size={9} />
+ <span>Retry failed</span>
+ </button>
+ )}
+ </div>
{/* Individual file rows */}
{isBundle && (
<div className="mt-1.5 space-y-0.5">
{files.map(({ id, d }) => (
<div key={id} className="flex items-center justify-between text-[0.55rem] text-gray-500">
<span className="truncate flex-1 font-mono">{d.filename || id}</span>
- <span className="shrink-0 ml-2">
+ <span className="shrink-0 ml-2 flex items-center gap-1">
{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 === 'error' ? (
+ <button
+ onClick={() => useDownloadStore.getState().retry(id)}
+ className="flex items-center gap-0.5 text-red-400 hover:text-red-300 transition-colors"
+ title={d.error || 'Download failed — click to retry'}
+ >
+ <RotateCcw size={8} />
+ <span>Retry</span>
+ </button>
+ )
: d.status === 'paused' ? <span className="text-yellow-400">Paused</span>
- : d.total > 0 ? `${Math.round((d.progress / d.total) * 100)}%`
+ : d.total > 0 ? <>{Math.round((d.progress / d.total) * 100)}%{d.speed > 0 && <span className="ml-1 text-gray-400">{formatBytes(d.speed)}/s</span>}</>
: d.status === 'connecting' ? 'Connecting' : '...'}
</span>
</div>
diff --git a/src/components/models/DiscoverModels.tsx b/src/components/models/DiscoverModels.tsx
index 285f0b1c..11d7acf8 100644
--- a/src/components/models/DiscoverModels.tsx
+++ b/src/components/models/DiscoverModels.tsx
@@ -13,6 +13,7 @@ import {
type DiscoverModel, type DownloadProgress, type ModelBundle, type CivitAIModelResult,
} from '../../api/discover'
import { getSystemVRAM } from '../../api/comfyui'
+import { openExternal } from '../../api/backend'
import { useDownloadStore } from '../../stores/downloadStore'
import { useModels } from '../../hooks/useModels'
import { useProviderStore } from '../../stores/providerStore'
@@ -201,9 +202,9 @@ function ModelDiscoverCard({ model, index, isText, getModelDownloadState, pullMo
</button>
) : null}
{model.url && (
- <a href={model.url} target="_blank" rel="noopener noreferrer" className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on website">
+ <button onClick={() => openExternal(model.url!)} className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on website">
<ExternalLink size={14} />
- </a>
+ </button>
)}
</>
)}
@@ -259,10 +260,20 @@ export function DiscoverModels({ category }: Props) {
// Check which bundles are REALLY installed (file size validated, not just file existence)
const [bundleStatuses, setBundleStatuses] = useState<Record<string, boolean>>({})
- useEffect(() => {
+ const refreshBundleStatuses = () => {
if (category !== 'image' && category !== 'video') return
const allBundles = [...getImageBundles(), ...getVideoBundles()]
checkBundlesInstalled(allBundles).then(statuses => setBundleStatuses(statuses))
+ }
+ useEffect(() => {
+ refreshBundleStatuses()
+ }, [category])
+
+ // Re-check bundle statuses when a download completes
+ useEffect(() => {
+ const handler = () => refreshBundleStatuses()
+ window.addEventListener('comfyui-model-downloaded', handler)
+ return () => window.removeEventListener('comfyui-model-downloaded', handler)
}, [category])
// Start polling on mount if there are active downloads
@@ -408,6 +419,9 @@ export function DiscoverModels({ category }: Props) {
}
const isBundleComplete = (bundle: ModelBundle): boolean => {
+ // If any file has error status, bundle is NOT complete
+ const hasError = bundle.files.some(f => f.filename && downloads[f.filename]?.status === 'error')
+ if (hasError) return false
// Check 1: Download store says all files complete (current session downloads)
const dlComplete = bundle.files.every(f => f.filename && downloads[f.filename]?.status === 'complete')
if (dlComplete) return true
@@ -419,6 +433,20 @@ export function DiscoverModels({ category }: Props) {
return bundle.files.some(f => f.filename && (downloads[f.filename]?.status === 'downloading' || downloads[f.filename]?.status === 'connecting'))
}
+ const hasBundleErrors = (bundle: ModelBundle): boolean => {
+ // Check for explicit error status in download store
+ if (bundle.files.some(f => f.filename && downloads[f.filename]?.status === 'error')) return true
+ // Also check: some files show complete in store but bundle is NOT fully installed on disk
+ // This catches the case where error entries were dismissed but the bundle is still incomplete
+ const hasAnyDownloadEntry = bundle.files.some(f => f.filename && downloads[f.filename])
+ if (hasAnyDownloadEntry && !bundleStatuses[bundle.name]) {
+ const someComplete = bundle.files.some(f => f.filename && downloads[f.filename]?.status === 'complete')
+ const allComplete = bundle.files.every(f => f.filename && downloads[f.filename]?.status === 'complete')
+ if (someComplete && !allComplete) return true
+ }
+ return false
+ }
+
const getBundleProgress = (bundle: ModelBundle): number => {
let totalBytes = 0, downloadedBytes = 0
for (const f of bundle.files) {
@@ -672,12 +700,34 @@ export function DiscoverModels({ category }: Props) {
</div>
<div className="flex items-center gap-1 shrink-0">
- {complete ? (
- <span className="text-xs text-green-500 px-2 py-1">Installed</span>
- ) : downloading ? (
+ {complete ? null : downloading ? (
<span className="p-2 text-gray-400">
<Loader2 size={14} className="animate-spin" />
</span>
+ ) : hasBundleErrors(bundle) ? (
+ <button
+ onClick={() => {
+ // Retry only the files that are NOT complete
+ for (const f of bundle.files) {
+ if (!f.filename || !f.downloadUrl || !f.subfolder) continue
+ const dl = downloads[f.filename]
+ // Retry if: explicit error, OR no download entry and not on disk
+ if (dl?.status === 'error') {
+ dlStore.getState().retry(f.filename)
+ } else if (!dl || (dl.status !== 'complete' && dl.status !== 'downloading' && dl.status !== 'connecting')) {
+ // File has no active download — start fresh
+ dlStore.getState().setMeta(f.filename, f.downloadUrl, f.subfolder)
+ startModelDownload(f.downloadUrl, f.subfolder, f.filename, f.sizeGB ? Math.round(f.sizeGB * 1_073_741_824) : undefined)
+ dlStore.getState().startPolling()
+ }
+ }
+ }}
+ className="flex items-center gap-1 px-2 py-1.5 rounded-lg bg-red-100 dark:bg-red-500/15 hover:bg-red-200 dark:hover:bg-red-500/25 text-red-700 dark:text-red-400 transition-all text-xs"
+ title="Retry failed downloads"
+ >
+ <RefreshCw size={12} />
+ <span>Retry</span>
+ </button>
) : (
<button
onClick={() => handleBundleInstall(bundle)}
@@ -688,9 +738,9 @@ export function DiscoverModels({ category }: Props) {
</button>
)}
{bundle.url && (
- <a href={bundle.url} target="_blank" rel="noopener noreferrer" className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on HuggingFace">
+ <button onClick={() => openExternal(bundle.url!)} className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on HuggingFace">
<ExternalLink size={14} />
- </a>
+ </button>
)}
</div>
</div>
@@ -761,9 +811,9 @@ export function DiscoverModels({ category }: Props) {
<Download size={14} />
</button>
) : null}
- <a href={model.sourceUrl} target="_blank" rel="noopener noreferrer" className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on CivitAI" aria-label="View on CivitAI">
+ <button onClick={() => openExternal(model.sourceUrl)} className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 transition-all" title="View on CivitAI" aria-label="View on CivitAI">
<ExternalLink size={14} />
- </a>
+ </button>
</div>
</div>
)
diff --git a/src/components/onboarding/Onboarding.tsx b/src/components/onboarding/Onboarding.tsx
index e3432f81..4d4b093b 100644
--- a/src/components/onboarding/Onboarding.tsx
+++ b/src/components/onboarding/Onboarding.tsx
@@ -8,6 +8,7 @@ import { ONBOARDING_MODELS, type OnboardingModel } from '../../lib/constants'
import { PROVIDER_PRESETS } from '../../api/providers/types'
import { detectLocalBackends, type DetectedBackend } from '../../lib/backend-detector'
import { ProgressBar } from '../ui/ProgressBar'
+import { openExternal } from '../../api/backend'
import { formatBytes } from '../../lib/formatters'
import { backendCall } from '../../api/backend'
import { getSystemVRAM } from '../../api/comfyui'
@@ -310,12 +311,10 @@ export function Onboarding() {
<div className="space-y-1 text-left max-h-[45vh] overflow-y-auto scrollbar-thin pr-1">
{LOCAL_BACKENDS.map(b => (
- <a
+ <button
key={b.id}
- href={b.url}
- target="_blank"
- rel="noopener noreferrer"
- className={`flex items-center gap-2.5 px-2.5 py-2 rounded-lg border transition-all group ${
+ onClick={() => openExternal(b.url)}
+ className={`flex items-center gap-2.5 px-2.5 py-2 rounded-lg border transition-all group text-left ${
isDark
? 'border-white/[0.06] hover:border-white/15 hover:bg-white/[0.03]'
: 'border-gray-200 hover:border-gray-400 hover:bg-gray-50'
@@ -330,7 +329,7 @@ export function Onboarding() {
<p className={`text-[0.55rem] ${isDark ? 'text-gray-500' : 'text-gray-400'}`}>{b.description}</p>
</div>
<span className={`text-[0.5rem] font-mono shrink-0 ${isDark ? 'text-gray-600' : 'text-gray-300'}`}>:{b.port}</span>
- </a>
+ </button>
))}
</div>
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index f108924d..23db5624 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -221,7 +221,7 @@ export const ONBOARDING_MODELS: OnboardingModel[] = [
{ name: 'huihui_ai/phi4-abliterated:14b', label: 'Phi-4 14B', description: 'Microsoft, great at math & logic', size: '9 GB', vram: '12 GB', vramGB: 12, uncensored: true },
{ name: 'huihui_ai/mistral-small-abliterated:24b', label: 'Mistral Small 24B', description: 'Powerful, needs 16GB+ VRAM', size: '14 GB', vram: '16 GB', vramGB: 16, uncensored: true, agent: true },
{ name: 'huihui_ai/glm4.6-abliterated:9b', label: 'GLM 4.6 9B', description: 'Newest model, strong coding', size: '6 GB', vram: '8 GB', vramGB: 8, uncensored: true, agent: true },
- { name: 'huihui_ai/qwen2.5-abliterated:7b', label: 'Qwen 2.5 7B', description: 'Lightweight & capable', size: '4.7 GB', vram: '6 GB', vramGB: 6, uncensored: true, agent: true },
+ { name: 'huihui_ai/qwen2.5-abliterate:7b', label: 'Qwen 2.5 7B', description: 'Lightweight & capable', size: '4.7 GB', vram: '6 GB', vramGB: 6, uncensored: true, agent: true },
{ name: 'huihui_ai/llama3.3-abliterated:70b-q4_K_M', label: 'Llama 3.3 70B', description: 'Maximum intelligence, needs 48GB', size: '42 GB', vram: '48 GB', vramGB: 48, uncensored: true, agent: true },
// Mainstream (official, not abliterated)
{ name: 'llama3.1:8b', label: 'Llama 3.1 8B', description: 'Meta general-purpose model', size: '4.7 GB', vram: '6 GB', vramGB: 6, recommended: true, agent: true },
diff --git a/src/stores/downloadStore.ts b/src/stores/downloadStore.ts
index e78e302d..6c034d33 100644
--- a/src/stores/downloadStore.ts
+++ b/src/stores/downloadStore.ts
@@ -1,5 +1,5 @@
import { create } from 'zustand'
-import { getDownloadProgress, pauseDownload, cancelDownload, resumeDownload, type DownloadProgress } from '../api/discover'
+import { getDownloadProgress, pauseDownload, cancelDownload, resumeDownload, startModelDownload, type DownloadProgress } from '../api/discover'
// Maps filename → bundle name for grouped display
type BundleMap = Record<string, string>
@@ -20,6 +20,7 @@ interface DownloadStoreState {
pause: (id: string) => Promise<void>
cancel: (id: string) => Promise<void>
resume: (id: string) => Promise<void>
+ retry: (id: string) => Promise<void>
dismiss: (id: string) => void
}
@@ -37,6 +38,8 @@ export const useDownloadStore = create<DownloadStoreState>()((set, get) => ({
polling: false,
pollInterval: null,
+ pollCount: 0,
+
refresh: async () => {
try {
const prog = await getDownloadProgress()
@@ -49,13 +52,15 @@ export const useDownloadStore = create<DownloadStoreState>()((set, get) => ({
}
}
- set({ downloads: prog })
+ const count = get().pollCount + 1
+ set({ downloads: prog, pollCount: count })
// Auto-stop polling when no active downloads
+ // BUT wait at least 5 polls before stopping — gives Rust time to register new downloads
const hasActive = Object.values(prog).some(d =>
d.status === 'downloading' || d.status === 'connecting' || d.status === 'pausing'
)
- if (!hasActive) {
+ if (!hasActive && count >= 5) {
get().stopPolling()
}
} catch {
@@ -67,7 +72,7 @@ export const useDownloadStore = create<DownloadStoreState>()((set, get) => ({
const state = get()
if (state.polling) return
const interval = setInterval(() => get().refresh(), 1000)
- set({ polling: true, pollInterval: interval })
+ set({ polling: true, pollInterval: interval, pollCount: 0 })
// Immediate first fetch
get().refresh()
},
@@ -120,6 +125,20 @@ export const useDownloadStore = create<DownloadStoreState>()((set, get) => ({
get().startPolling()
},
+ retry: async (id: string) => {
+ const meta = get().downloadMeta[id]
+ if (!meta) return
+ // Clear the error state first
+ set(s => {
+ const updated = { ...s.downloads }
+ delete updated[id]
+ return { downloads: updated }
+ })
+ // Re-start the download from scratch
+ await startModelDownload(meta.url, meta.subfolder, id)
+ get().startPolling()
+ },
+
dismiss: (id: string) => {
set(s => {
const updated = { ...s.downloads }
diff --git a/src/stores/providerStore.ts b/src/stores/providerStore.ts
index 89d681a8..499a814a 100644
--- a/src/stores/providerStore.ts
+++ b/src/stores/providerStore.ts
@@ -47,7 +47,7 @@ const DEFAULT_PROVIDERS: Record<ProviderId, ProviderConfig> = {
openai: {
id: 'openai',
name: 'LM Studio',
- enabled: true,
+ enabled: false,
baseUrl: 'http://localhost:1234/v1',
apiKey: '',
isLocal: true,
diff --git a/src/stores/updateStore.ts b/src/stores/updateStore.ts
index d980e794..e627e72b 100644
--- a/src/stores/updateStore.ts
+++ b/src/stores/updateStore.ts
@@ -1,6 +1,7 @@
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
import { version as currentVersion } from '../../package.json'
+import { openExternal } from '../api/backend'
// ── Types ─────────────────────────────────────────────────────
@@ -116,7 +117,7 @@ export const useUpdateStore = create<UpdateState>()(
},
openReleasePage: () => {
- window.open('https://locallyuncensored.com', '_blank')
+ openExternal('https://locallyuncensored.com')
},
}),
{