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:
Extracts: GPU name, total VRAM, free VRAM, ComfyUI version.
2. Installed nodes:
Returns all registered node classes with their input/output specifications.
3. Installed models (per type):
Offline Mode (Directory Scan)
When ComfyUI isn't running, scan the filesystem directly.
Requires: ComfyUI installation path (e.g., C:\ComfyUI)
Scan directories:
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:
Workflow Validation
Given a workflow JSON, validate against inventory:
Common Node-to-Package Mapping
Cache Freshness
- Cache is valid for 1 hour during active sessions
- Invalidate cache when user installs new models/nodes
- Force refresh:
scan-inventory.ps1or API re-query
Integration
- Called by
comfyui-workflow-builderbefore generating workflows - Called by
comfyui-character-gen(via agent wrapper) for model selection - Called by
comfyui-troubleshooterwhen diagnosing missing model errors - Results stored in
state/inventory.jsonfor all skills to reference


