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(trainer): der Trainer stirbt auf Windows mit zwei GPUs nicht mehr am libuv

Davidc25617dcf595
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18aa1f99..c082039e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -161,6 +161,12 @@ engine has a name of its own, the LU Engine.
window.
- **Error messages from Windows arrive in English**, and a ComfyUI
requirements.txt that cannot be used is named instead of silently skipped.
+- **Character training no longer stops at the first step on a Windows machine
+ with more than one GPU.** torch asked for libuv, which the Windows wheels do
+ not carry, and the run died with "use_libuv was requested but PyTorch was
+ build without libuv support". LU now sets USE_LIBUV=0 for every trainer
+ process on Windows. Reported in GitHub #121; nobody here has two GPUs, so
+ this is the documented torch workaround rather than a measured fix.
## [2.6.7] - 2026-08-31
diff --git a/README.md b/README.md
index 3a5af939..d144ca51 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ Grab the latest release from [**Releases**](https://github.com/PurpleDoubleD/loc
### What's new in 2.6.8
-The effort release. A reasoning model now has an effort control beside its Think button, Low, Medium and High with Max on GLM 5.3, and the steps come from the server for each model, so a model that offers none keeps the plain button it always had. GLM 5.3 (Pro) and GLM 5.3 Flash (Hosted) joined the cloud catalogue, and the cloud model list holds one fixed order, because the upstream provider shuffles its own list on every call and a new chat opened on whatever happened to be first. Document Chat works in Cloud mode, with your files indexed on your own machine and only the passages that match your question travelling with the prompt. The built-in engine goes by LU Engine now: it moves to a free port when 8127 is taken, retries once after a start that fails, and a chat model you downloaded stays visible as Installed with a Use button that starts the engine for it. A running LM Studio keeps its own heading in the picker, and one click hands the local slot back to it. Model Storage is read now, not only written to, so every GGUF up to four levels down shows up under Installed, and the three backends got three named rows instead of one field labelled auto-detect. The CivitAI API key has a field again. AMD on Windows is read from the HIP SDK, because the only ROCm probe ran rocm-smi and the Windows SDK does not ship it (#123); that one is researched rather than proven, since there is no RDNA4 card here. The Model Manager also stopped reading system RAM as video memory. AMD cards on Linux report their memory size without ROCm installed, because LU read that size only through rocm-smi, which comes with the ROCm developer packages rather than with the driver, so the card was found and its size was not; that reading has now been measured on a rented AMD Instinct MI325X, and on that card LU also lists it with its name and gfx target (a compute card reports itself as a processing accelerator rather than as graphics, so it used to be missing from the hardware list entirely), installs PyTorch from the ROCm channel it picks, and rendered an image, a video, a song, a 4x upscale and a cutout in Create. Also fixed: the deb and the rpm ask for libvulkan1 and libgomp1 instead of letting the engine die in the loader, the ComfyUI installer proves that the environment it just built can import ComfyUI and Repair can be cancelled, the Coding Agent's working directory can be removed again, the prompt history in Create can be cleared, the side panel folds away with your latest chats on the main screen, Settings shows the port the LU Engine really runs on, Windows error messages arrive in English, a ComfyUI that will not start names the cause instead of sending you into a repair that cannot fix it, every Python step LU starts runs with UTF-8 output so a Windows account name outside the English alphabet stops breaking the install partway through, German phrasing reaches the chat tools again now that the filler word "mal" no longer counts as the command to paint and the German words for the internet are on the list, and the Mac stopped scanning your whole home folder for a ComfyUI it never runs there, which is what made macOS ask for access to Apple Music and the Desktop at first launch.
+The effort release. A reasoning model now has an effort control beside its Think button, Low, Medium and High with Max on GLM 5.3, and the steps come from the server for each model, so a model that offers none keeps the plain button it always had. GLM 5.3 (Pro) and GLM 5.3 Flash (Hosted) joined the cloud catalogue, and the cloud model list holds one fixed order, because the upstream provider shuffles its own list on every call and a new chat opened on whatever happened to be first. Document Chat works in Cloud mode, with your files indexed on your own machine and only the passages that match your question travelling with the prompt. The built-in engine goes by LU Engine now: it moves to a free port when 8127 is taken, retries once after a start that fails, and a chat model you downloaded stays visible as Installed with a Use button that starts the engine for it. A running LM Studio keeps its own heading in the picker, and one click hands the local slot back to it. Model Storage is read now, not only written to, so every GGUF up to four levels down shows up under Installed, and the three backends got three named rows instead of one field labelled auto-detect. The CivitAI API key has a field again. AMD on Windows is read from the HIP SDK, because the only ROCm probe ran rocm-smi and the Windows SDK does not ship it (#123); that one is researched rather than proven, since there is no RDNA4 card here. The Model Manager also stopped reading system RAM as video memory. AMD cards on Linux report their memory size without ROCm installed, because LU read that size only through rocm-smi, which comes with the ROCm developer packages rather than with the driver, so the card was found and its size was not; that reading has now been measured on a rented AMD Instinct MI325X, and on that card LU also lists it with its name and gfx target (a compute card reports itself as a processing accelerator rather than as graphics, so it used to be missing from the hardware list entirely), installs PyTorch from the ROCm channel it picks, and rendered an image, a video, a song, a 4x upscale and a cutout in Create. Also fixed: the deb and the rpm ask for libvulkan1 and libgomp1 instead of letting the engine die in the loader, the ComfyUI installer proves that the environment it just built can import ComfyUI and Repair can be cancelled, the Coding Agent's working directory can be removed again, the prompt history in Create can be cleared, the side panel folds away with your latest chats on the main screen, Settings shows the port the LU Engine really runs on, Windows error messages arrive in English, a ComfyUI that will not start names the cause instead of sending you into a repair that cannot fix it, every Python step LU starts runs with UTF-8 output so a Windows account name outside the English alphabet stops breaking the install partway through, German phrasing reaches the chat tools again now that the filler word "mal" no longer counts as the command to paint and the German words for the internet are on the list, and the Mac stopped scanning your whole home folder for a ComfyUI it never runs there, which is what made macOS ask for access to Apple Music and the Desktop at first launch. Character training on a Windows machine with more than one GPU no longer dies at the first step over a libuv that the Windows torch wheels do not carry (#121); LU sets USE_LIBUV=0 for every trainer process there, the documented torch workaround, since nobody here has two GPUs to measure it on.
### What's new in 2.6.7
diff --git a/src-tauri/src/commands/trainer.rs b/src-tauri/src/commands/trainer.rs
index 94128724..621b0e8a 100644
--- a/src-tauri/src/commands/trainer.rs
+++ b/src-tauri/src/commands/trainer.rs
@@ -177,9 +177,19 @@ fn active_comfy_dir(state: &AppState) -> Option<PathBuf> {
/// practice the moment tqdm draws its block-glyph progress bar, which is
/// exactly when the train step finally has a step total. Force UTF-8 stdio
/// on every trainer child instead.
+///
+/// The same hook carries the second Windows-only environment fix. GitHub #121
+/// (Z0mbieK, two GPUs, 2026-08-29): the train step died at start with
+/// "use_libuv was requested but PyTorch was build without libuv support".
+/// torch 2.4+ asks for libuv by default when torch.distributed sets up its
+/// store on Windows, and the Windows wheels are built without it. USE_LIBUV=0
+/// is the knob torch itself reads for that; it changes nothing on a single
+/// GPU and nothing outside the trainer's children.
fn force_python_utf8(cmd: &mut Command) {
cmd.env("PYTHONIOENCODING", "utf-8");
cmd.env("PYTHONUTF8", "1");
+ #[cfg(target_os = "windows")]
+ cmd.env("USE_LIBUV", "0");
}
/// cu121 wheels carry kernels up to sm_90 (Hopper). Blackwell reports
@@ -1971,6 +1981,11 @@ mod tests {
.collect();
assert!(envs.contains(&("PYTHONIOENCODING".into(), Some("utf-8".into()))));
assert!(envs.contains(&("PYTHONUTF8".into(), Some("1".into()))));
+ // GitHub #121: only Windows wheels lack libuv, so only Windows gets the knob.
+ #[cfg(target_os = "windows")]
+ assert!(envs.contains(&("USE_LIBUV".into(), Some("0".into()))));
+ #[cfg(not(target_os = "windows"))]
+ assert!(!envs.iter().any(|(k, _)| k == "USE_LIBUV"));
}
#[test]
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index 2ec8351a..98256286 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -68,6 +68,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [
'On the Mac, LU stopped searching your whole home folder for a ComfyUI it never runs there. That search touched the Desktop and Music folders, so macOS asked for access to Apple Music and to the Desktop at first launch, and the window sat on LOADING while the search ran. On Windows and Linux the same search moved off the main thread, so a slow disk no longer freezes the window.',
'Error messages from Windows arrive in English, and a ComfyUI requirements.txt that cannot be used is named instead of silently skipped.',
'LU starts MCP servers through npx and uvx only. The app window used to be allowed to launch node, python, deno, bun, docker and the package managers as well. Each of those takes a one line script (node -e, python -c) or hands out the whole disk (docker run -v /:/host), so any scripting bug anywhere in the window was code execution on your machine. If a server of yours is set to run one of them, LU names it and says what it can run instead.',
+ 'Character training no longer stops at the first step on a Windows machine with more than one GPU. torch asked for libuv, which the Windows wheels do not carry, and the run died with "use_libuv was requested but PyTorch was build without libuv support". LU now sets USE_LIBUV=0 for every trainer process on Windows. Reported in GitHub #121; nobody here has two GPUs, so this is the documented torch workaround rather than a measured fix.',
'A ComfyUI that will not start names the cause. A missing Visual C++ runtime, or a graphics driver older than the PyTorch that was installed, used to arrive as "the Python environment looks broken" next to a Repair button, and neither of those lives in the folder Repair rebuilds. The message now says which of the two it is, and LU no longer starts a repair that cannot fix it.',
'Every Python step LU starts now runs with UTF-8 output. One step out of eight did before, so on a Windows account whose name falls outside the English alphabet, a single character in a path could end an install or a probe partway through.',
'AMD cards on Linux report their memory size without ROCm installed. LU read AMD memory only through rocm-smi, which comes with the ROCm developer packages rather than with the driver, so the card was found and its size was not. The size comes from the kernel now. An integrated AMD chip is deliberately left out, because the number it reports there is the fixed carve-out rather than what it can actually use. This reading has now been measured on a rented AMD Instinct card, where the kernel number and the number ComfyUI reports for itself are the same number.',