Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions comfy_cli/auth/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import os
import re
import secrets
from collections.abc import Iterable
from dataclasses import asdict, dataclass
from datetime import datetime, timezone
from pathlib import Path
Expand Down Expand Up @@ -211,10 +210,6 @@ def remove(provider: str) -> bool:
return True


def known_providers() -> Iterable[str]:
return SUPPORTED_PROVIDERS


# ---------------------------------------------------------------------------
# Cloud OAuth session
# ---------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions comfy_cli/cloud/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ class OAuthRefreshError(OAuthError):
code = "oauth_refresh_failed"


class OAuthCancelled(OAuthError):
code = "oauth_cancelled"


class OAuthTimeout(OAuthError):
code = "oauth_timeout"

Expand Down
6 changes: 0 additions & 6 deletions comfy_cli/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,12 +1103,6 @@ def run_cli(
)


def validate_comfyui(_env_checker):
if _env_checker.comfy_repo is None:
rprint("[bold red]If ComfyUI is not installed, this feature cannot be used.[/bold red]")
raise typer.Exit(code=1)


@app.command(help="Stop background ComfyUI")
@tracking.track_command()
def stop():
Expand Down
4 changes: 0 additions & 4 deletions comfy_cli/command/generate/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,3 @@ def write_cache(yaml_text: str) -> Path:
load_raw_spec.cache_clear()
_registry.cache_clear()
return _USER_CACHE


def active_spec_path() -> Path:
return _select_spec_path()
6 changes: 0 additions & 6 deletions comfy_cli/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
console = Console()


def get_os_details():
os_name = platform.system() # e.g., Linux, Darwin (macOS), Windows
os_version = platform.release()
return os_name, os_version


def _pip_install_torch(python: str, index_args: list[str]) -> subprocess.CompletedProcess:
"""Install torch, torchvision, and torchaudio with the given index arguments."""
return subprocess.run(
Expand Down
5 changes: 0 additions & 5 deletions comfy_cli/error_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@ class ErrorCode:
"OAuth token refresh failed.",
"run `comfy cloud login` to sign in again",
),
ErrorCode(
"oauth_cancelled",
"OAuth flow was cancelled by the user.",
"re-run `comfy cloud login` to retry sign-in",
),
ErrorCode(
"oauth_timeout",
"Timed out waiting for browser callback during OAuth login.",
Expand Down
20 changes: 0 additions & 20 deletions comfy_cli/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,6 @@ def show_progress(iterable, total, description="Downloading..."):
ChoiceType = str | Choice | dict[str, Any]


def prompt_autocomplete(
question: str, choices: list[ChoiceType], default: ChoiceType = "", force_prompting: bool = False
) -> ChoiceType | None:
"""
Asks a single select question using questionary and returns the selected response.

Args:
question (str): The question to display to the user.
choices (List[ChoiceType]): A list of choices the user can autocomplete from.
default (ChoiceType): Default choice.
force_prompting (bool): Whether to force prompting even if skip_prompting is set.

Returns:
Optional[ChoiceType]: The selected choice from the user, or None if skipping prompts.
"""
if workspace_manager.skip_prompting and not force_prompting:
return None
return questionary.autocomplete(question, choices=choices, default=default).ask()


def prompt_select(
question: str, choices: list[ChoiceType], default: ChoiceType = "", force_prompting: bool = False
) -> ChoiceType | None:
Expand Down
6 changes: 0 additions & 6 deletions comfy_cli/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import subprocess
import sys
import time
from importlib.metadata import metadata
from pathlib import Path

import requests
Expand Down Expand Up @@ -40,11 +39,6 @@ def check_for_newer_pypi_version(package_name, current_version):
return False, current_version


def get_version_from_pyproject():
package_metadata = metadata("comfy-cli")
return package_metadata["Version"]


def upgrade_cli():
"""Upgrade the ``comfy-cli`` package itself via pip against the running
interpreter. Raises ``CalledProcessError`` if pip fails — fail fast."""
Expand Down
15 changes: 0 additions & 15 deletions comfy_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@
import functools
import platform
import shutil
import subprocess
import tarfile
from contextlib import contextmanager
from pathlib import Path
from typing import BinaryIO, cast

import psutil
import requests
import typer
from rich import progress
from rich.live import Live
from rich.table import Table

from comfy_cli.constants import DEFAULT_COMFY_WORKSPACE, OS, PROC

# Use the output shim so prints go to stderr (not stdout) in JSON mode,
# preserving the one-envelope-on-stdout contract.
from comfy_cli.output import rprint as print # noqa: A001 - intentional shadowing
from comfy_cli.typing import PathLike


Expand Down Expand Up @@ -70,15 +64,6 @@ def get_proc():
raise ValueError


def install_conda_package(package_name):
try:
subprocess.check_call(["conda", "install", "-y", package_name])
print(f"[bold green] Successfully installed {package_name} [/bold green]")
except subprocess.CalledProcessError as e:
print(f"[bold red] Failed to install {package_name}. Error: {e} [/bold red]")
raise typer.Exit(code=1)


def get_not_user_set_default_workspace():
return DEFAULT_COMFY_WORKSPACE[get_os()]

Expand Down
2 changes: 0 additions & 2 deletions comfy_cli/where.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
from enum import Enum
from typing import Any

from comfy_cli.cancellation import get_token # noqa: F401 — re-exported indirectly


class WhereTarget(str, Enum):
LOCAL = "local"
Expand Down
Loading