Skip to content

feat(skills): comfyui v4.1 — official CLI + REST + hardware-gated local install#17610

Merged
teknium1 merged 5 commits into
mainfrom
hermes/hermes-328a27bb
Apr 29, 2026
Merged

feat(skills): comfyui v4.1 — official CLI + REST + hardware-gated local install#17610
teknium1 merged 5 commits into
mainfrom
hermes/hermes-328a27bb

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of #17607 (@alt-glitch) with an added hardware-feasibility gate so the skill doesn't silently push users toward a local install their machine can't actually run.

Base work (by @alt-glitch, preserved from #17607)

  • Drops the unofficial comfyui-skill-cli dependency (superseded approach from feat(skills): add comfyui skill — CLI-driven image/video/audio generation #17316)
  • Uses official Comfy-Org/comfy-cli for lifecycle (install/launch/nodes/models)
  • Direct REST API for workflow execution via three helper scripts:
    • run_workflow.py — param injection, submission, polling, output download, cloud auth
    • extract_schema.py — workflow JSON → controllable-parameter schema
    • check_deps.py — per-workflow missing-nodes/models check against running server
  • 5 documented install paths: Comfy Cloud, ComfyUI Desktop, Portable, comfy-cli, manual
  • Full reference files: official-cli.md, rest-api.md, workflow-format.md
  • Two CodeQL URL-sanitization fixes included

Added on top

  • scripts/hardware_check.py detects OS/GPU/VRAM/Apple Silicon and emits structured JSON:
    {"verdict": "ok|marginal|cloud", "comfy_cli_flag": "--nvidia|--amd|--m-series|null", ...}
    Thresholds: <6 GB VRAM → cloud, Intel Mac → cloud, <16 GB M1/M2 unified → cloud, ≥8 GB VRAM or ≥32 GB unified → ok.
  • comfyui_setup.sh runs the hardware check first and refuses to install locally when verdict=cloud (exit 2, prints Comfy Cloud URL + override command). Auto-selects the right comfy install --flag otherwise.
  • SKILL.md adds mandatory "Step 0: Check If This Machine Can Run ComfyUI Locally" before the install-path table. Thresholds documented inline. Version 4.0.0 → 4.1.0.
  • AUTHOR_MAP gains @alt-glitch's noreply email (CI requirement for CodeQL-autofix commits).

Validation

Path Result
Auto-pick on RTX 3090 (Linux) verdict=ok → picks --nvidia, proceeds to install
Simulated no-GPU machine verdict=cloud → exit 2, Comfy Cloud URL + override command
User override --m-series Skips hardware check, proceeds with user-supplied flag

All 4 Python scripts syntax-check clean, shell scripts pass bash -n.

Credits

@alt-glitch — full v4 rewrite
@kshitijk4poor — original skill design
@HuangYuChuh — pattern source for workflow parameter extraction

Closes #17607
Supersedes #17316 #11143 #13271

alt-glitch and others added 5 commits April 29, 2026 12:35
…y dependency

Complete rewrite of the ComfyUI skill to use:
- comfy-cli (official, Comfy-Org/comfy-cli) for lifecycle management:
  install, launch, stop, node management, model downloads
- Direct REST API + helper scripts for workflow execution:
  parameter injection, submission, monitoring, output download
- No dependency on comfyui-skill-cli or any unofficial tool

New files:
- SKILL.md: full rewrite with two-layer architecture, decision tree, pitfalls
- references/official-cli.md: complete comfy-cli command reference
- references/rest-api.md: all REST endpoints (local + cloud)
- references/workflow-format.md: API format spec, common nodes, param mapping
- scripts/extract_schema.py: analyze workflow → extract controllable params
- scripts/run_workflow.py: inject args, submit, poll, download outputs
- scripts/check_deps.py: check missing nodes/models against running server
- scripts/comfyui_setup.sh: full setup automation with official CLI

Removed:
- references/cli-reference.md (was for unofficial comfyui-skill-cli)
- references/api-notes.md (replaced by rest-api.md)

Addresses feedback from PR #17316 comment:
- Correct author attribution
- Remove references to unofficial OpenClaw project
- License field reflects hermes-agent repo (MIT)
…links, cloud setup

Adds structured onboarding flow to SKILL.md:
- Decision table: which install path for which situation
- Path A: Comfy Cloud (zero setup, API key, pricing)
- Path B: Desktop app (Windows/macOS, one-click)
- Path C: Portable build (Windows, extract-and-run)
- Path D: comfy-cli (recommended for agents, all platforms)
- Path E: Manual install (advanced, all hardware types)
- Post-install: model downloads, custom nodes, verification

All paths link to official docs:
- https://docs.comfy.org/installation
- https://docs.comfy.org/comfy-cli/getting-started
- https://docs.comfy.org/get_started/cloud
- https://docs.comfy.org/installation/desktop
- https://docs.comfy.org/installation/comfyui_portable_windows
- https://docs.comfy.org/installation/manual_install
…ring sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ring sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Layers a programmatic hardware-feasibility check on top of the v4 skill
so the agent doesn't silently push users toward a local install they
can't actually run. The official comfy-cli supports --nvidia / --amd /
--m-series / --cpu, but has no guard against "4 GB laptop GPU on SDXL"
or "Intel Mac falling back to CPU" — both route to comfy-cli paths in
the original table and then fail on first workflow.

- scripts/hardware_check.py: detect OS/arch/GPU (NVIDIA nvidia-smi,
  AMD rocm-smi, Apple M1+ via arm64+sysctl, Intel Arc via clinfo),
  VRAM, system/unified RAM. Emits JSON
  {verdict: ok|marginal|cloud, recommended_install_path, comfy_cli_flag}
  with practical thresholds: discrete GPU >=6 GB VRAM minimum,
  Apple Silicon >=16 GB unified memory minimum, Intel Mac -> cloud,
  no accelerator -> cloud. comfy_cli_flag maps directly to
  `comfy install` so the agent can stitch the whole flow together.

- scripts/comfyui_setup.sh: runs hardware_check.py first when no
  explicit flag is passed. If verdict=cloud, refuses to install
  locally, prints Comfy Cloud URL + an override command, exits 2.
  Otherwise auto-selects the right --nvidia/--amd/--m-series flag
  for `comfy install`. Surfaces marginal-verdict notes to the user.

- SKILL.md Setup & Onboarding: adds mandatory Step 0 "Check If This
  Machine Can Run ComfyUI Locally" ahead of the Path A-E selection.
  Documents the verdict thresholds inline, ties verdict + comfy_cli_flag
  to the install paths, and updates the path-choice table so
  "verdict: cloud" is the first row. Quick-Start "Detect Environment"
  block extended to include the hardware check. Verification
  checklist gains a hardware-check gate.

- Frontmatter setup.help rewritten to point at hardware_check.py
  first. Version bumped 4.0.0 -> 4.1.0.
@teknium1 teknium1 merged commit 9d7ece3 into main Apr 29, 2026
10 of 11 checks passed
@teknium1 teknium1 deleted the hermes/hermes-328a27bb branch April 29, 2026 19:39
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) labels Apr 29, 2026
teknium1 added a commit that referenced this pull request Apr 29, 2026
Intended placement per PR #17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
donald131 pushed a commit to donald131/hermes-agent that referenced this pull request May 2, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
nickdlkk pushed a commit to nickdlkk/hermes-agent that referenced this pull request May 11, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
)

Intended placement per PR NousResearch#17610 discussion — comfyui belongs in
skills/creative/ alongside other creative built-ins (touchdesigner-mcp,
pretext, sketch), not in optional-skills/.

Pure directory rename, no content changes. History preserved via git mv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants