Add support for custom node only snapshots (#4) (#1542)

* Add support for custom node only snapshots (#4)

* Fix ruff lint.

---------

Co-authored-by: pythongosssss <125205205+pythongosssss@users.noreply.github.com>
This commit is contained in:
Robin Huang
2025-02-13 14:26:35 -08:00
committed by GitHub
parent 6ff6e05408
commit eebace1652
4 changed files with 21 additions and 13 deletions

View File

@@ -1012,17 +1012,22 @@ def save_snapshot(
user_directory: str = typer.Option(
None,
help="user directory"
)
),
full_snapshot: Annotated[
bool,
typer.Option(
show_default=False, help="If the snapshot should include custom node, ComfyUI version and pip versions (default), or only custom node details"
),
] = True,
):
cmd_ctx.set_user_directory(user_directory)
path = asyncio.run(core.save_snapshot_with_postfix('snapshot', output))
path = core.save_snapshot_with_postfix('snapshot', output, not full_snapshot)
print(f"Current snapshot is saved as `{path}`")
@app.command("restore-snapshot", help="Restore snapshot from snapshot file")
def restore_snapshot(
snapshot_name: str,
snapshot_name: str,
pip_non_url: Optional[bool] = typer.Option(
default=None,
show_default=False,