Skip to content
Merged
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
11 changes: 0 additions & 11 deletions comfy_cli/output/branding.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,6 @@ def branded_panel(
)


def cli_footer(*, version: str, where: str | None = None) -> Text:
"""Right-aligned, dim subtitle used as the pretty-mode brand signature.

Every pretty rendering that *isn't* already a Panel should print this
after its primary output so the human always knows which tool / version /
routing target produced what they're looking at.
"""
suffix = f" · {where}" if where else ""
return Text(f"comfy CLI v{version}{suffix}", style="dim", justify="right")


# ---------------------------------------------------------------------------
# Wordmark — handcrafted 5-row block art, kept narrow enough for an 80-col tty
# ---------------------------------------------------------------------------
Expand Down
7 changes: 0 additions & 7 deletions comfy_cli/output/glyphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,3 @@ def status_glyph(status: str | None) -> str:
canonical = _canonical(status)
glyph, style = STATUS_STYLE.get(canonical, DEFAULT_STYLE)
return f"[{style}]{glyph} {canonical or 'unknown'}[/{style}]"


def glyph_only(status: str | None) -> str:
"""Return just the colored glyph, no label — handy for tight tables."""
canonical = _canonical(status)
glyph, style = STATUS_STYLE.get(canonical, DEFAULT_STYLE)
return f"[{style}]{glyph}[/{style}]"
7 changes: 0 additions & 7 deletions comfy_cli/output/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,6 @@ def throttled_event(self, token: str, type: str, *, max_hz: float = 10.0, **fiel
self.event(type, **fields)
return True

def flush_throttled(self, token: str, type: str, **fields: Any) -> None:
"""Force-emit one final event for a throttle token (e.g., on completion)."""
if not self.is_stream():
return
self._throttle[token] = time.monotonic()
self.event(type, **fields)

# ----- internals -----

def _envelope(
Expand Down
46 changes: 0 additions & 46 deletions comfy_cli/workspace_manager.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import concurrent.futures
import os
from dataclasses import dataclass, field
from datetime import datetime
from enum import Enum
from pathlib import Path

import git
import typer
Expand Down Expand Up @@ -120,31 +118,6 @@ def check_comfy_repo(path) -> tuple[bool, str | None]:
return False, None


# Generate and update this following method using chatGPT
# def load_yaml(file_path: str) -> ComfyLockYAMLStruct:
# with open(file_path, "r", encoding="utf-8") as file:
# data = yaml.safe_load(file)
# basics = Basics(
# name=data.get("basics", {}).get("name"),
# updated_at=(
# datetime.fromisoformat(data.get("basics", {}).get("updated_at"))
# if data.get("basics", {}).get("updated_at")
# else None
# ),
# )
# models = [
# Model(
# name=m.get("model"),
# url=m.get("url"),
# paths=[ModelPath(path=p.get("path")) for p in m.get("paths", [])],
# hash=m.get("hash"),
# type=m.get("type"),
# )
# for m in data.get("models", [])
# ]
# custom_nodes = []


# Generate and update this following method using chatGPT
def save_yaml(file_path: str, metadata: ComfyLockYAMLStruct):
data = {
Expand All @@ -168,12 +141,6 @@ def save_yaml(file_path: str, metadata: ComfyLockYAMLStruct):
yaml.safe_dump(data, file, default_flow_style=False, allow_unicode=True)


# Function to check if the file is config.json
def check_file_is_model(path):
if path.name.endswith(constants.SUPPORTED_PT_EXTENSIONS):
return str(path)


class WorkspaceType(Enum):
CURRENT_DIR = "current_dir"
DEFAULT = "default"
Expand Down Expand Up @@ -318,19 +285,6 @@ def scan_dir(self):
model_files.append(os.path.join(root, file))
return model_files

def scan_dir_concur(self):
base_path = Path(".")
model_files = []

# Use ThreadPoolExecutor to manage concurrency
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [executor.submit(check_file_is_model, p) for p in base_path.rglob("*")]
for future in concurrent.futures.as_completed(futures):
if future.result():
model_files.append(future.result())

return model_files

def load_metadata(self):
file_path = os.path.join(self.workspace_path, constants.COMFY_LOCK_YAML_FILE)
if os.path.exists(file_path):
Expand Down
Loading