plan_packages
Preview what installing pip requirements would change before anything downloads, and refuse plans that would swap out your CUDA torch build.
Instructions
Say what installing these requirements would change - and refuse if it is unsafe.
Nothing is written and nothing is downloaded. This is the tool that answers the
question that caused all of this to exist, and the answer is worth reading in full
before any install: on the install this was built against, asking for
torchvision==0.25.0 - an ordinary pin out of a node pack's requirements.txt -
plans to replace torch 2.11.0+cu130 with torch 2.10.0, the build with no CUDA.
Nothing in that request mentions torch and nothing in the output is an error.
refused is set when the plan touches a package whose version belongs to the CUDA
build rather than to any requirement. That is a refusal rather than a warning
because the cost of being wrong is a gigabytes-long download and a machine whose
GPU has stopped being used, and because there is a right way to do it anyway: pin
the requirement so it accepts the torch that is already here.
Args:
requirements: pip requirement strings, e.g. ["insightface", "onnxruntime>=1.17"].
upgrade: also move packages that are already satisfied. Off by default, which is
what makes installing a node pack's requirements leave the rest alone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upgrade | No | ||
| requirements | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||