feat: TEM-54 check CUDA-sensitive local packages - #32
Open
Chmokachka wants to merge 1 commit into
Open
Conversation
Chmokachka
marked this pull request as ready for review
August 20, 2026 16:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a non-invasive startup diagnostic for CUDA-sensitive packages installed in the persistent ComfyUI venv.
CUDA 13 currently reuses
.venv-cu128. That is safe when the venv only inherits the image packages through--system-site-packages, but locally installed CUDA packages can take precedence over the image's bakedtorch+cu130stack and prevent ComfyUI from starting.The new diagnostic runs after venv activation and before ComfyUI starts. It logs:
/opt/comfyui-runtime-constraints.txttorch,torchvision,torchaudio,xformers,triton,onnxruntime, andsageattentionIt does not modify, delete, migrate, or recreate user venvs. When PyTorch cannot be imported, originates from the persistent venv, or has a CUDA build that differs from the image expectation, the startup logs a warning with the relevant evidence.
Validation
Tested on CUDA 13 pods with a persistent volume:
.venv-cu128contained only pip; the diagnostic confirmed bakedtorch+cu130from/usr/local/..., CUDA was available, and ComfyUI started successfully.torch==2.10.0+cu128into.venv-cu128; the diagnostic identified the local package and failed torch import before ComfyUI crashed with the expected CUDA-library traceback.triton==3.7.1into.venv-cu128; it was listed as CUDA-sensitive, while bakedtorch+cu130remained active and ComfyUI started successfully.This confirms that a local CUDA-sensitive package is not automatically a conflict; the relevant signal is the active PyTorch stack and its actual import path.
CI checks
Dev build - https://github.com/runpod-workers/comfyui-base/actions/runs/32363217503
Check incompatibilities - https://github.com/runpod-workers/comfyui-base/actions/runs/32382313870
https://github.com/runpod-workers/comfyui-base/actions/runs/32382357658