Files
Niko00 5538a03d8b Make torchaudio optional in the PyTorch check and restore, and in the install scripts (#3388)
ComfyUI no longer needs torchaudio, but PIPFixer.fix_broken() still
required it. On an install with torch and torchvision and without
torchaudio it logged "[ComfyUI-Manager] PyTorch is not installed" at
every start, after a cm-cli install, update or fix, and after the server
installed the requirements of a nodepack, and it never restored PyTorch
when a nodepack changed torch or torchvision.

- Require and compare only torch and torchvision in the check, so such
  an install is not reported as one without PyTorch, and a nodepack that
  changes only torchaudio starts no restore
- Name torchaudio in the restore commands only when it was installed
  before the nodepack or is installed after it, so the restore adds no
  torchaudio to an install that has none
- Do not install torchaudio in the Linux and Windows venv install
  scripts and the Colab notebook
- Add tests that run fix_broken() and check the commands it sends
- Add a CHANGELOG entry

What the restore installs is not changed: an install without torchaudio
gets the commands that an install with torchaudio gets, without
torchaudio.

The same change for manager-v4 is #3606.
2026-11-27 20:13:44 +09:00
..