From 55358e7b5a04d5189514b4284bc539eaf06d9ec1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Apr 2026 20:08:33 +0000 Subject: [PATCH] format: auto-format code [skip ci] --- tensors/cli.py | 18 ++++++++++-------- tensors/comfyui.py | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tensors/cli.py b/tensors/cli.py index e667e29..5d61b70 100644 --- a/tensors/cli.py +++ b/tensors/cli.py @@ -790,9 +790,7 @@ def generate( # noqa: PLR0915 output: Annotated[Path | None, typer.Option("-o", "--output", help="Save path (default: current dir)")] = None, remote: Annotated[str | None, typer.Option("-r", "--remote", help="Remote server name or URL")] = None, json_output: Annotated[bool, typer.Option("--json", "-j", help="Output as JSON")] = False, - json_input: Annotated[ - str | None, typer.Option("--input", "-I", help="JSON params (keys match CLI options)") - ] = None, + json_input: Annotated[str | None, typer.Option("--input", "-I", help="JSON params (keys match CLI options)")] = None, ) -> None: """Generate an image using text-to-image. @@ -838,11 +836,15 @@ def generate( # noqa: PLR0915 # Determine which CLI params the user explicitly set click_ctx = ctx._context if hasattr(ctx, "_context") else ctx - explicit = { - p.name - for p in click_ctx.command.params - if click_ctx.get_parameter_source(p.name) == click.core.ParameterSource.COMMANDLINE - } if hasattr(click_ctx, "get_parameter_source") else set() + explicit = ( + { + p.name + for p in click_ctx.command.params + if click_ctx.get_parameter_source(p.name) == click.core.ParameterSource.COMMANDLINE + } + if hasattr(click_ctx, "get_parameter_source") + else set() + ) # Apply JSON values for anything not explicitly set on CLI if "prompt" in mapped and ("prompt" not in explicit and prompt is None): diff --git a/tensors/comfyui.py b/tensors/comfyui.py index b5b1ac5..32cece7 100644 --- a/tensors/comfyui.py +++ b/tensors/comfyui.py @@ -709,6 +709,7 @@ DEFAULT_WORKFLOW_TEMPLATE: dict[str, Any] = { }, } + def _build_workflow( prompt: str, negative_prompt: str = "",