Comfyui Inventory

mckruz/comfyui-expert/skills/comfyui-inventory

作者 mckruzdee27dc3d69b无许可证91 个星标收录于 2026年10月8日更新于 2026年10月8日仓库6个月前更新

Discover and cache all installed ComfyUI models, custom nodes, and system capabilities. Works online (API queries) and offline (directory scanning). Use before generating workflows to verify available resources.

已归档仅含说明DevOps & Cloud
AI 生成的概览

盘点已安装的 ComfyUI 模型、自定义节点和系统能力,并缓存结果用于工作流校验。

功能
该技能用于发现用户 ComfyUI 实例中已安装的内容:既可以查询正在运行的 ComfyUI API,也可以在离线状态下扫描安装目录中的模型与自定义节点文件夹。它会把 GPU、显存、版本信息、按类型划分的模型文件名以及自定义节点包记录到缓存清单文件中。它还描述了如何用该清单校验工作流 JSON,并报告缺失的节点或模型,给出安装或下载建议。
适用场景
在生成或运行 ComfyUI 工作流之前使用,以确认实际可用的模型、节点和硬件资源。它也用于排查模型或节点缺失的错误,并在新安装后刷新缓存的清单。
运行要求
需要 PowerShell(pwsh),并通过 COMFYUI_PATH 环境变量提供 ComfyUI 安装路径。在线模式需要可访问本机的 ComfyUI 服务 API;离线模式需要对 ComfyUI 目录的文件系统访问权限。该技能不附带脚本,仅提供说明。

ComfyUI Inventory Skill

Discovers what's installed in the user's ComfyUI instance and caches results for workflow validation.

Purpose

Every workflow generation MUST be preceded by an inventory check. This prevents:

  • Referencing models that aren't downloaded
  • Using nodes that aren't installed
  • Exceeding VRAM limits

Two Discovery Modes

Online Mode (ComfyUI API Running)

Query the live server for authoritative information.

1. System info:

bash
curl http://127.0.0.1:8188/system_stats

Extracts: GPU name, total VRAM, free VRAM, ComfyUI version.

2. Installed nodes:

bash
curl http://127.0.0.1:8188/object_info

Returns all registered node classes with their input/output specifications.

3. Installed models (per type):

bash
curl http://127.0.0.1:8188/models/checkpointscurl http://127.0.0.1:8188/models/lorascurl http://127.0.0.1:8188/models/vaecurl http://127.0.0.1:8188/models/controlnetcurl http://127.0.0.1:8188/models/clipcurl http://127.0.0.1:8188/models/clip_visioncurl http://127.0.0.1:8188/models/upscale_modelscurl http://127.0.0.1:8188/models/diffusion_models

Offline Mode (Directory Scan)

When ComfyUI isn't running, scan the filesystem directly.

Requires: ComfyUI installation path (e.g., C:\ComfyUI)

Scan directories:

{ComfyUI}/models/checkpoints/    → .safetensors, .ckpt{ComfyUI}/models/loras/          → .safetensors{ComfyUI}/models/vae/            → .safetensors, .pt{ComfyUI}/models/controlnet/     → .safetensors, .pth{ComfyUI}/models/clip/           → .safetensors{ComfyUI}/models/clip_vision/    → .safetensors{ComfyUI}/models/upscale_models/ → .pth, .safetensors{ComfyUI}/models/diffusion_models/ → .safetensors{ComfyUI}/models/ipadapter/      → .safetensors, .bin{ComfyUI}/models/instantid/      → .bin{ComfyUI}/models/insightface/    → .onnx + folders{ComfyUI}/models/facerestore_models/ → .pth{ComfyUI}/models/ultralytics/bbox/ → .pt{ComfyUI}/custom_nodes/          → folder names = node packages

Custom node detection: List directories under custom_nodes/. Each directory name corresponds to a node package (e.g., ComfyUI_IPAdapter_plus, ComfyUI-Impact-Pack).

Cache Format

Save results to state/inventory.json:

json
{  "last_updated": "2026-02-06T12:00:00Z",  "mode": "online",  "comfyui_version": "0.3.10",  "system": {    "gpu": "NVIDIA RTX 5090",    "vram_total_gb": 32,    "vram_free_gb": 28  },  "models": {    "checkpoints": ["flux1-dev.safetensors", "RealVisXL_V5.0.safetensors"],    "loras": ["sage_character.safetensors"],    "vae": ["ae.safetensors", "wan_2.1_vae.safetensors"],    "controlnet": ["instantid_controlnet.safetensors"],    "clip": ["t5xxl_fp16.safetensors", "clip_l.safetensors"],    "clip_vision": ["CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors"],    "upscale_models": ["4x-UltraSharp.pth"],    "diffusion_models": ["wan2.1_i2v_720p_14b_bf16.safetensors"],    "ipadapter": ["ip-adapter-faceid-plusv2_sd15.bin"],    "instantid": ["ip-adapter.bin"],    "insightface": ["inswapper_128.onnx"],    "facerestore": ["codeformer.pth"],    "detection": ["face_yolov8m.pt"]  },  "custom_nodes": [    "ComfyUI-Manager",    "ComfyUI_IPAdapter_plus",    "ComfyUI_InstantID",    "ComfyUI-Impact-Pack",    "ComfyUI-AnimateDiff-Evolved",    "ComfyUI-VideoHelperSuite"  ]}

Workflow Validation

Given a workflow JSON, validate against inventory:

For each node:  1. Check class_type against known node classes  2. If missing: identify which custom_node package provides it  3. Suggest install: "Install via ComfyUI-Manager: {package_name}"
For each model reference:  1. Check filename against inventory models of that type  2. If missing: look up in references/models.md for download link  3. Report: "Missing: {filename} - Download from {url} -> {path}"

Common Node-to-Package Mapping

Node ClassPackage
ApplyInstantIDComfyUI_InstantID
IPAdapterUnifiedLoaderComfyUI_IPAdapter_plus
FaceDetailerComfyUI-Impact-Pack
ReactorFaceSwapComfyUI-ReActor
AnimateDiffLoaderWithContextComfyUI-AnimateDiff-Evolved
VideoHelper*ComfyUI-VideoHelperSuite
ControlNetApply*comfyui_controlnet_aux
UltimateSDUpscaleComfyUI_UltimateSDUpscale
VHS_*ComfyUI-VideoHelperSuite
RIFE*ComfyUI-Frame-Interpolation

Cache Freshness

  • Cache is valid for 1 hour during active sessions
  • Invalidate cache when user installs new models/nodes
  • Force refresh: scan-inventory.ps1 or API re-query

Integration

  • Called by comfyui-workflow-builder before generating workflows
  • Called by comfyui-character-gen (via agent wrapper) for model selection
  • Called by comfyui-troubleshooter when diagnosing missing model errors
  • Results stored in state/inventory.json for all skills to reference

来源与署名

来源:mckruz/comfyui-expert位于skills/comfyui-inventory提交dee27dc

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架