[PR #3388] fix: make torchaudio optional in recovery and installers #3256

Open
opened 2026-10-28 21:16:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/3388
Author: @0nikod
Created: 10/17/2026
Status: 🔄 Open

Base: main ← Head: fix/optional-torchaudio-installation


📝 Commits (1)

  • 315c7da fix: make torchaudio optional in recovery and installers

📊 Changes

4 files changed (+5 additions, -6 deletions)

View changed files

📝 glob/manager_util.py (+2 -3)
📝 notebooks/comfyui_colab_with_manager.ipynb (+1 -1)
📝 scripts/install-comfyui-venv-linux.sh (+1 -1)
📝 scripts/install-comfyui-venv-win.bat (+1 -1)

📄 Description

Summary

Treat torchaudio as optional in PyTorch recovery checks and remove it from the explicit installation commands in the Linux/Windows venv scripts and Colab notebook.

Background

ComfyUI removed its mandatory torchaudio dependency in https://github.com/Comfy-Org/ComfyUI/pull/16457. Manager still required torchaudio in its recovery checks and explicitly installed it in several installation entry points.

Replaces #3387 with the installation entry points included.

Changes

  • Require only torch and torchvision in the initial PyTorch inventory check.
  • Stop using torchaudio version changes as a trigger for PyTorch recovery.
  • Remove torchaudio from the Linux and Windows venv installation commands and the Colab notebook installation command.
  • Preserve existing rollback commands, version mappings, platform indexes, package blacklists, downgrade protection, and snapshot protection.

Reproduction

With unchanged torch and torchvision versions installed but no torchaudio, Manager previously logged:

[ComfyUI-Manager] PyTorch is not installed

This environment now passes the recovery check without an error or rollback caused by optional torchaudio. The three installation entry points no longer explicitly request torchaudio.

Testing

  • Nine isolated recovery scenarios passed with mocked inventories, logging, rollback, and subprocess calls: unchanged environments with and without torchaudio; missing torch or torchvision; torch or torchvision version changes; and torchaudio addition, removal, and version changes. No subprocess calls were executed.
  • Verified the recovery code is byte-for-byte identical to that validated patch.
  • bash -n scripts/install-comfyui-venv-linux.sh: passed.
  • Parsed the notebook as JSON and verified each of the three installation entry points differs only by removing torchaudio.
  • UV_CACHE_DIR=/tmp/manager-uv-cache uv run --offline --no-project --with aiohttp --with ruff ruff check --no-cache .: passed.
  • git diff --check, staged diff check, and git diff HEAD^ HEAD --check: passed.
  • No test files are added. The full suite was not rerun for this reduced patch. No real package installation, Windows execution, Colab execution, or GPU validation was performed.

Compatibility

Existing torchaudio installations are not uninstalled. Custom nodes that need it can continue using it. Required torch and torchvision recovery behavior remains unchanged; when another condition triggers rollback, the existing rollback commands may still install torchaudio. Existing package blacklists and snapshot protection are retained. No package versions, installation indexes, runtime dependencies, or snapshot formats change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/3388 **Author:** [@0nikod](https://github.com/0nikod) **Created:** 10/17/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/optional-torchaudio-installation` --- ### 📝 Commits (1) - [`315c7da`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/315c7da5c2d720c19e35df4a5e7a5f199c8a05b9) fix: make torchaudio optional in recovery and installers ### 📊 Changes **4 files changed** (+5 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `glob/manager_util.py` (+2 -3) 📝 `notebooks/comfyui_colab_with_manager.ipynb` (+1 -1) 📝 `scripts/install-comfyui-venv-linux.sh` (+1 -1) 📝 `scripts/install-comfyui-venv-win.bat` (+1 -1) </details> ### 📄 Description ## Summary Treat torchaudio as optional in PyTorch recovery checks and remove it from the explicit installation commands in the Linux/Windows venv scripts and Colab notebook. ## Background ComfyUI removed its mandatory torchaudio dependency in https://github.com/Comfy-Org/ComfyUI/pull/16457. Manager still required torchaudio in its recovery checks and explicitly installed it in several installation entry points. Replaces #3387 with the installation entry points included. ## Changes - Require only torch and torchvision in the initial PyTorch inventory check. - Stop using torchaudio version changes as a trigger for PyTorch recovery. - Remove torchaudio from the Linux and Windows venv installation commands and the Colab notebook installation command. - Preserve existing rollback commands, version mappings, platform indexes, package blacklists, downgrade protection, and snapshot protection. ## Reproduction With unchanged torch and torchvision versions installed but no torchaudio, Manager previously logged: ```text [ComfyUI-Manager] PyTorch is not installed ``` This environment now passes the recovery check without an error or rollback caused by optional torchaudio. The three installation entry points no longer explicitly request torchaudio. ## Testing - Nine isolated recovery scenarios passed with mocked inventories, logging, rollback, and subprocess calls: unchanged environments with and without torchaudio; missing torch or torchvision; torch or torchvision version changes; and torchaudio addition, removal, and version changes. No subprocess calls were executed. - Verified the recovery code is byte-for-byte identical to that validated patch. - `bash -n scripts/install-comfyui-venv-linux.sh`: passed. - Parsed the notebook as JSON and verified each of the three installation entry points differs only by removing torchaudio. - `UV_CACHE_DIR=/tmp/manager-uv-cache uv run --offline --no-project --with aiohttp --with ruff ruff check --no-cache .`: passed. - `git diff --check`, staged diff check, and `git diff HEAD^ HEAD --check`: passed. - No test files are added. The full suite was not rerun for this reduced patch. No real package installation, Windows execution, Colab execution, or GPU validation was performed. ## Compatibility Existing torchaudio installations are not uninstalled. Custom nodes that need it can continue using it. Required torch and torchvision recovery behavior remains unchanged; when another condition triggers rollback, the existing rollback commands may still install torchaudio. Existing package blacklists and snapshot protection are retained. No package versions, installation indexes, runtime dependencies, or snapshot formats change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#3256
No description provided.