PyTorch Version Checker:
PyTorchVersionChecker checks the PyTorch environment used by your workflow. It reads the installed PyTorch version, checks whether CUDA is available, and compares the PyTorch version with a 2.10 threshold. This gives you a quick way to inspect the environment when troubleshooting compatibility. The node prints its findings to the console as well as making them available to other nodes; it does not install or apply a patch.
PyTorch Version Checker Input Parameters:
There are no input parameters. The node checks the environment in which it runs, so there are no settings, defaults, ranges, or options to configure.
PyTorch Version Checker Output Parameters:
pytorch_version
A STRING containing the installed PyTorch version as reported by PyTorch, such as 2.10.0. You can use it to identify the version your workflow is running with. The node returns the reported version without modifying it.
cuda_version
A STRING containing the CUDA version reported by the installed PyTorch build when torch.cuda.is_available() is true. Otherwise, it returns N/A. This tells you what the node can report about CUDA in the current environment; N/A means the availability check returned false, not necessarily that your computer has no compatible graphics hardware.
needs_patch
A BOOLEAN that is True when the parsed PyTorch version is 2.10 or later, and False for earlier versions. Despite its name, this is only a version-threshold flag: the source does not test whether a particular patch is installed, determine whether your workflow needs one, or apply one. The node bases the flag on the first two dot-separated parts of the reported PyTorch version.
PyTorch Version Checker Usage Tips:
- Run the node when you need to confirm which PyTorch version your workflow is using, and read the printed results in the console or connect its outputs where useful.
- There are no configuration settings to tune. The results depend on the PyTorch environment running the node.
- Treat
needs_patchas a prompt to check the compatibility guidance for the relevant workflow, not as proof that a patch is missing. - If
cuda_versionisN/Aand you expected CUDA, check the environment in which the workflow runs. The node reports the result of PyTorch’s CUDA availability check; it does not diagnose the cause.
PyTorch Version Checker Common Errors and Solutions:
ModuleNotFoundError: No module named 'torch'
- Explanation: The environment loading the node cannot import PyTorch, so the node cannot run its check.
- Solution: Install PyTorch in the same Python environment as your workflow, then restart the application so it can load the node again.
ValueError: invalid literal for int() with base 10
- Explanation: The node converts the first two dot-separated parts of
torch.__version__to numbers. This error can occur if one of those parts is not a plain number. - Solution: Check the PyTorch version string printed by the environment or reported by a separate version check. Use a PyTorch build with a version string this node can parse, or have the node’s version-parsing code updated.
CUDA Version: N/A
- Explanation: This is a reported value, not an error message. It appears when PyTorch’s CUDA availability check returns false.
- Solution: If you expected CUDA, check that the workflow is running in the intended environment and that PyTorch can access CUDA there. If you do not use CUDA, no action is needed.
