v2.17.0-pre.2 Technical Notes
Extended technical notes for the v2.17.0-pre.2 release — the deeper "how and why" behind each change. For the user-facing summary, see the CHANGELOG.
Table of Contents
- Wan2GP on Python 3.11, PyTorch 2.10 and CUDA 13
- Package Environment Variables No Longer Silently Override Your Settings
- Node.js Extraction on Linux and macOS
- Shared Model Folder Links Hiding DiffusionModels
- Uninstall Size with Symlink Sharing
- Where Model Categories Are Stored
- Thumbnail Cache for Local Images
Wan2GP on Python 3.11, PyTorch 2.10 and CUDA 13
Wan2GP's own installer (the GPU profiles in its setup_config.json) moved RTX 20XX and newer to Python 3.11 with a CUDA 13 build of PyTorch, keeping Python 3.10 only for GTX 10XX. Stability Matrix still installed Python 3.10 attention wheels, so a Python 3.11 venv failed with sageattention ... has no wheels with a matching Python version tag.
The NVIDIA install now chooses its stack from the venv's Python version:
- Python 3.11 and newer (any NVIDIA card except GTX 10XX): torch 2.10.0, torchvision 0.25.0 and torchaudio 2.10.0 from the
cu130index, with their dependencies, so the CUDA 13 runtime (and Triton, on Linux) comes along. Ampere (RTX 30XX) and newer cards also get:- Windows:
triton-windows3.6, SageAttention through the same wheel resolver ComfyUI uses (woct0rdho's post6 build for CUDA 13 and torch 2.10 or newer), and Wan2GP's Flash Attention wheel, which is published for Python 3.11 only. - Linux: Wan2GP's own SageAttention build (the
cg1wheel for CUDA 13 and torch 2.10). Flash Attention is skipped, since Wan2GP's Linux installer builds it from source.
- Windows:
- Python 3.10: the torch 2.7 stack as before, with
triton-windows3.3.1 and the Python 3.10 attention wheels on Ampere and newer.
RTX 20XX gets the CUDA 13 PyTorch build and, as before, no Triton or attention wheels. New installs default to Python 3.11, or 3.10 on GTX 10XX.
Existing installs keep their stack
Updates reuse the install's recorded Python version, and Wan2GP declares no minimum version that would trigger the venv-recreating upgrade prompt, so an install created on Python 3.10 keeps torch 2.7.1 and triton-windows 3.3.1 (on Windows) on every update. Triton can't be bumped alone: triton-windows 3.4 and later pair with torch 2.8 and later. Newer Wan2GP models that compile Triton kernels, such as LTX 2.5, can fail on that stack (#1756).
Change Version offers no Python choice either, so moving to the new stack means a fresh install:
- In the Package Manager, add Wan2GP again under a different name. The installer won't accept a name that's already in use.
- Open Advanced Options and check that Python Version is 3.11 (the default on RTX 20XX and newer).
- Once it's installed and working, copy your outputs and anything else you want to keep from the old install folder, then uninstall the old copy.
Driver check at launch
CUDA 13 needs NVIDIA driver 580 or newer. Wan2GP's launch now runs the same check as ComfyUI and AI Toolkit: on an NVIDIA card other than GTX 10XX, if the driver's major version is below 580 and the venv's torch is a +cu130 build, it prints a console warning recommending a driver update (or an older torch index such as cu128) and stops the launch. Python 3.10 installs, and systems where the driver version can't be read, launch unchecked.
Package Environment Variables No Longer Silently Override Your Settings
Several packages set their own workaround environment variables (most commonly SETUPTOOLS_USE_DISTUTILS, which keeps distutils importable for setuptools-based builds) directly on the venv process, after it had already been seeded with whatever you'd configured under Settings → Environment Variables. A value you set yourself was silently clobbered the moment the package launched.
This surfaced on Wan2GP: it forced SETUPTOOLS_USE_DISTUTILS=stdlib on every launch, which crashes with ModuleNotFoundError: No module named 'distutils' on Python 3.12+, where distutils is gone from the standard library, and no user-set override could survive to work around it. The same unconditional force existed in AI Toolkit's SageAttention source build and VladAutomatic's Zluda/Rocm paths, though those already had a Python-version guard Wan2GP was missing.
Two changes:
- User env vars win.
Settings.IsEnvironmentVariableUserOverridden(key)checks the actual configured environment variables (list or legacy dict format,IsEnabledrespected), independent of what a package's own code has already written into the in-progress environment dictionary. A newenv.SetPackageDefault(settingsManager, key, value)extension applies a package's computed default only when that check comes back false, and replaces every unconditionalSETUPTOOLS_USE_DISTUTILSwrite (Wan2GP, AI Toolkit, VladAutomatic, and PipWheelService's SageAttention build) along withCogstudio'sUV_SKIP_WHEEL_FILENAME_CHECKandReforge/A3WebUI'sSTABLE_DIFFUSION_REPO. Because the check is against your real settings rather than "is this key currently present," a package can still legitimately override its own base class's default (Reforge's Stable Diffusion repo URL over A3WebUI's) without that being mistaken for a user override. SETUPTOOLS_USE_DISTUTILSis version-gated everywhere. Wan2GP now pickslocalon Python 3.12+ andstdlibbelow it, matching the guard AI Toolkit already carried (localuses setuptools' own vendoreddistutilscopy, which works on any Python version;stdlibrequires the real module to exist). PipWheelService's SageAttention build gained the sameMinor < 12guard VladAutomatic already had, since it previously set the workaround unconditionally on every Python version.
Cogstudio's temporary UV_SKIP_WHEEL_FILENAME_CHECK override (needed for one specific pinned wheel with a mismatched internal version) also had a finally block that unconditionally removed the variable, wiping out a value you'd set yourself. That's now a reusable helper, venvRunner.RunWithTemporaryEnvironmentVariableAsync(key, value, action), which snapshots whatever was there before the override and restores exactly that when the action completes or throws.
Deliberately out of scope: install-path-derived variables like INVOKEAI_ROOT, COMFYUI_PATH, COMFYUI_MODEL_PATH, UV_BUILD_CONSTRAINT, and PIP_CONSTRAINT. Those record facts about the install rather than tunable workarounds, so letting a user override them would just break the launch rather than fix anything.
Node.js Extraction on Linux and macOS
On Linux and macOS, AI Toolkit's Node.js prerequisite comes from the official v20.19.3 .tar.gz, which contains relative symlinks for npm, npx and corepack. The bundled 7-Zip rejects those as dangerous link paths, so AI Toolkit installs on Linux failed before Python setup started (#1767).
Rather than turning 7-Zip's protection off, the Unix Node install now goes through a small dedicated extractor built on .NET's System.Formats.Tar. It extracts directories and regular files first, keeping their Unix permissions so node stays executable, and creates the symlinks only after every file is out, so no archive entry can write through a link the same archive created. Each link is written as a relative link to its checked, normalized target. Extraction fails on:
- absolute paths, backslash or drive/UNC spellings, and any path that resolves outside the destination;
- a link whose target is not a regular file extracted from the same archive, which also rules out directory links, link chains and missing targets;
- hard links and special entries such as devices and FIFOs;
- an existing symlink or junction anywhere along a destination path.
Windows Node installs and every other archive extraction keep their existing behavior.
Shared Model Folder Links Hiding DiffusionModels
Every SwarmUI install gets Models/diffusion_models, a link to Models/DiffusionModels. Since 2.16.4 the model index follows links but scans each physical folder at most once (see Workflow Library Link Loops), so the alias and the real folder competed for one folder, and the scan order let the last-listed entry win. On NTFS _ sorts after uppercase letters, so diffusion_models won every time. Diffusion models were then indexed only under the alias, whose name maps to no model type, so the Checkpoint Manager showed bare filenames without previews or metadata, and Image Lab and Inference missed them (#1749, #1753, #1755).
The rule now: the real directory tree is scanned first, then links are followed in order of how many links each path passes through, and the first path to reach a physical folder owns it. A real folder is the zero-link case, so it always beats an alias. If DiffusionModels is itself a link to another drive and the alias points at that link, the direct link is one hop and the alias two, so name sort order (or Linux's unordered listing) never decides. Links are resolved one at a time through each stored target, which is what counts the hops and also stops resolution passing through subst drive letters, where every file had been listed twice.
Not covered: a hand-made link whose stored target uses a different drive alias (T:\... while the library is reached through C:\...) can still list files twice. Stability Matrix's own links are spelled from the models folder, so they can't hit this.
Diagnosed and first fixed by @NeuralFault (#1743), with the link-count ordering by @ionite34 (#1763).
Uninstall Size with Symlink Sharing
For a package using symlink sharing, the package size shown in the uninstall confirmation (added in 2.16.4) could be the size of the whole shared model library. The count skipped links only among the package folder's direct children, then recursed with options that follow nested links, and symlink sharing puts its links one level down (models/checkpoints). It's now one enumeration that skips links at every depth and still counts hidden files, shared with the size shown when installing over an existing folder. Only the number was wrong: the delete checks for links at every level and only unlinks them, so shared models were never removed.
Where Model Categories Are Stored
Model categories live in each model's existing .cm-info.json, in a User block holding the category names (plus a flag for models you disconnected from their source). Membership travels with the file through moves, renames and folder copies; settings hold only each category's name and colour.
Every .cm-info.json write goes through one save path that carries the User block already on disk across when the data being written has none, so downloads and metadata refreshes can't drop your categories. Since a category alone creates a sidecar, "linked to a source" now means a CivitAI model id, an OpenModelDb or CivArchive source, or a HuggingFace source URL, not just having a .cm-info.json. Bulk Find Connected Metadata scans every unlinked model except ones you disconnected.
Thumbnail Cache for Local Images
Checkpoint Manager cards had no image cache and the Outputs grid keeps only 64 decoded images in memory, so scrolling back decoded the full source file again. Local image loads now go through an on-disk cache of downscaled WebP thumbnails in StabilityMatrix/Cache/Thumbnails under the system temp folder.
- A thumbnail's key covers the source's path, size, last-write time and the requested width, so an edited or replaced file gets a new one. Images no wider than the requested width aren't stored.
- A thumbnail that won't decode is deleted and rebuilt.
- The first image load of each session starts a background sweep that deletes thumbnails nobody has shown for 30 days, which keeps thumbnails of deleted outputs from piling up.
- Source files are never modified. Preview images and outputs stay full resolution, and anything that asks for the full image still decodes the original.
The decode width is now in device-independent pixels times the window's display scaling, so thumbnails are sharp at 150% and 200%. At 200% each decoded thumbnail has four times the pixels, so the Outputs memory cache can use up to four times the memory; at 100% nothing changes. On 40 real outputs averaging 2.8 MB, a cached 600 px thumbnail loaded in 3.4 ms against 113 ms for a full decode, at about 46 KB on disk each.