feat(node): support --fast-deps on restore-snapshot (BE-4276) - #589
feat(node): support --fast-deps on restore-snapshot (BE-4276)#589mattmillerai wants to merge 1 commit into
Conversation
Add a --fast-deps flag to `comfy node restore-snapshot`, mirroring the `comfy install --fast-deps` UX requested in issue #217. cm_cli's `restore-snapshot` subcommand accepts --uv-compile but NOT --no-deps (unlike install/reinstall), so the DependencyCompiler-based fast path is unavailable there. The fast uv dependency install that restore-snapshot *does* support is --uv-compile (it sets no-deps and batch-resolves with uv internally), so --fast-deps forwards that path. Default behavior is unchanged when the flag is omitted.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
✅ No high-signal findings.
Panel: 6/8 reviewers contributed findings.
Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)
ELI-5
comfy install --fast-depsuses the fast uv installer, but restoring asnapshot with many custom nodes had no equivalent — so it stayed slow. This adds
a
--fast-depsflag tocomfy node restore-snapshotso the restore also usesthe fast uv dependency install. Requested in issue #217.
What changed
--fast-depsoption oncomfy node restore-snapshot.--fast-deps --no-uv-compileis rejected with a clear error.Why it maps to
--uv-compile(the interesting bit / AC #3)comfy-cli has two uv-based fast paths:
--fast-deps(install/reinstall): pass--no-depsto cm_cli, then runcomfy-cli's own
DependencyCompiler.--uv-compile: pass--uv-compileto cm_cli, which batch-resolves with uv.I verified against ComfyUI-Manager's actual cm_cli v4 source
(
cm_cli/__main__.py,manager-v4branch): itsrestore-snapshotsubcommandaccepts
--uv-compilebut does not accept--no-deps(onlyinstall/reinstall/fix/updateaccept--no-deps). So path (1) isgenuinely unavailable upstream for snapshot restore — passing
--no-depswould make cm_cli error out.
The fast uv install that
restore-snapshotdoes support is--uv-compile,which internally does
cmd_ctx.set_no_deps(True)+ a batch uv resolve — i.e. italready is the fast-deps equivalent. So
--fast-depsforwards that path ratherthan being silently ignored. On a ComfyUI-Manager older than v4.1 (no
--uv-compileon restore-snapshot), cm_cli surfaces its own "no such option"error — same contract as the pre-existing
--uv-compileflag.Acceptance criteria
restore-snapshot <file> --fast-depsaccepts the flag and forwards theuv/fast path.
--fast-depsis set;default behavior unchanged when omitted.
limitation (no
--no-depson restore-snapshot) is documented above.Judgment calls
restore-dependencieshas the identical uv plumbing and could gain thesame alias, but issue Add "--fast-deps" (using uv) flag to restore snapshot functionality #217 and the ticket scope this to
restore-snapshotonly — left as an easy follow-up rather than expanding scope.
--fast-depsmaps to the--uv-compilemechanism here (not theDependencyCompilermechanism it uses forinstall), because that is the onlyfast uv path cm_cli exposes for snapshot restore. The help text says so.
Testing
tests/comfy_cli/command/nodes/test_restore_snapshot_fast_deps.py(5 tests):flag forwards
uv_compile=True, default omitted staysFalse,--uv-compilestill works,
--fast-deps --no-uv-compileis rejected, pip extras compose.tests/comfy_cli/command+ cm_cli suites: 1282 passed, 2 skipped.ruff check+ruff format --diff: clean.