restore_checkpoint
Restore recorded package versions to undo a bad upgrade, optionally removing newer packages for a full rollback. Requires stopping ComfyUI first and creates a safety checkpoint.
Instructions
Put a recorded set of package versions back. Takes a checkpoint of the current state first.
The undo for everything that installs. Two strengths, and the difference is what happens to packages that appeared since:
default - install the recorded versions and leave anything else alone. This is what undoes a bad upgrade, and it is safe because it only ever puts things back.
exact=True- also uninstall whatever is not on the recorded list. A true rollback, and the one that can lose work: everything it removes was installed after the checkpoint, which is usually a node pack's dependency and occasionally something that took an hour to compile. It is refused when the removal set holds a build no index can supply, andallow_removingis how a caller says it means it.
Not undoable, so a checkpoint of the current state is written first and named in
the reply - the same guard load_workspace uses, and for the same reason: the tool
cannot ask whether it is about to destroy something, so it makes sure the answer
does not matter.
Refused while ComfyUI is running. Its interpreter holds the DLLs being replaced, and half-replaced packages under a live process is how an install stops starting. Call comfy_stop first.
Args:
name: a checkpoint name from list_checkpoints, or an unambiguous prefix.
exact: also remove packages that are not in the checkpoint.
allow_removing: package names this call is permitted to remove even though
nothing could install them back. Only meaningful with exact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| exact | No | ||
| allow_removing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||