This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

ComfyUI tools role

Install selected ComfyUI models, node packs, workflows and dependencies

This role configures an existing ComfyUI installation from ordinary role variables. Supply the application directory, runtime arguments and model-directory map, plus the selected model entries, Git node packs, first-party source paths and workflow files. Required inputs default to null and are validated before installation; optional inputs have static defaults.

The role knows no profile registry or JSON schema. The deployment playbook loads its JSON and translates it into those variables once, without mutable profile facts. Other callers can supply the same variables directly. Large artifacts remain caller dependencies rather than dependencies of every collection consumer.

defaults/main.yaml documents the complete input contract. Public model URLs require a publisher commit or SHA-256. Git packs require full commit IDs. Loopback HTTP model fixtures and local Git repositories are supported for local acceptance. Gated Hugging Face downloads receive the optional token only on the publisher request; tasks hide it and redirects do not forward it. The role accepts comfyui_tools_hugging_face_token as a caller input and never contacts Vault itself. Set comfyui_tools_require_hugging_face_token when selected model downloads require authentication. This deployment obtains the token through AL injection and maps its environment value in the playbook. Requirements use the existing Python environment with --require-hashes --no-deps.

The role waits for the aggregate /prompt idle count before installation, before changing loaded code and before restart. It reads no prompts, queue entries, job history, inputs or outputs. This is an operator-coordinated idle window, not a lock against another client submitting new work. Changed model, node, dependency or argument inputs notify one restart. Workflows do not require a restart. Pass --skip-tags workflows to preserve operator workflow edits. Unselected files and generated images are retained.

The role manages COMFYUI_ARGS in the supplied environment file. Its baseline arguments come from the caller; only installed node directories are appended to the whitelist. The Vast bootstrap preserves this line across reboot. The optional pinned Video2X installation currently uses /opt/imagegen, the sequence node’s established tool contract. Other application paths are configurable.

The local acceptance fixture runs the packaged role without a GPU, SSH connection, account credential or live service.

1 - Defaults

Defaults for comfyui_tools
# Required caller inputs for the existing ComfyUI installation.
comfyui_tools_directory: null
comfyui_tools_arguments: null
comfyui_tools_model_directories: null

comfyui_tools_python_environment: /venv/main
comfyui_tools_state_directory: /opt/imagegen
comfyui_tools_environment_file: /etc/environment
comfyui_tools_api_url: http://127.0.0.1:18188
comfyui_tools_restart_command: [supervisorctl, restart, comfyui]
comfyui_tools_idle_retries: 60
comfyui_tools_idle_delay: 5

# Model entries: filename, kind, immutable URL and optional sha256.
comfyui_tools_models: []
comfyui_tools_hugging_face_token: ""
comfyui_tools_require_hugging_face_token: false
# Git packs: directory name -> {url, ref}; ref is a full immutable commit.
comfyui_tools_git_nodes: {}
# First-party modules and browser scripts: directory name -> controller file.
comfyui_tools_node_sources: {}
comfyui_tools_node_web_scripts: {}
# Controller files for locked requirements, native workflows and optional Video2X.
comfyui_tools_python_requirements: ""
comfyui_tools_workflows: []
comfyui_tools_required_nodes: []
comfyui_tools_interpolation_source: ""