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(startup): run ollama/comfyui auto-start off the main thread

purpleca7517f41b3f
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index ba0fe783..2175c6c6 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -352,8 +352,18 @@ fn main() {
// ─── Auto-start services ───
let state = app.state::<AppState>();
- commands::process::auto_start_ollama(&state);
- commands::process::auto_start_comfyui(&state);
+ // Off the main thread: auto_start_comfyui's find_comfyui_path()
+ // walks $HOME, which can take minutes on a big disk — on the main
+ // thread that stalls window creation and the app "runs with no
+ // window" until the scan finishes (2.5.6 regression, re-fixed).
+ {
+ let handle = app.handle().clone();
+ std::thread::spawn(move || {
+ let state = handle.state::<AppState>();
+ commands::process::auto_start_ollama(&state);
+ commands::process::auto_start_comfyui(&state);
+ });
+ }
let handle = app.handle().clone();
let python_bin = state.python_bin.lock().unwrap().clone();