Custom ComfyUI nodes for resolving and publishing assets directly from a workflow via OpenAssetIO.
This project allows ComfyUI to leverage the abilities of OpenAssetIO-enabled asset management systems, such as versioning, dependency tracking, and collaboration.
For example, if the asset manager supports a meta-version of "latest", then the workflow inputs can be updated without having to edit the workflow or move files around.
Then, when the workflow completes, the output can be published back to the asset manager, which typically creates a new version/revision (rather than overwriting), and makes the output available for review and for use by downstream tools.
-
OpenAssetIO Resolve Image: An alternative to the built-in Load Image node that resolves an OpenAssetIO entity reference to an image.
-
OpenAssetIO Publish Image: An alternative to the built-in Save Image node that publishes the output of a workflow to an OpenAssetIO entity reference.
The plugin is known to work with
- Python 3.11
- ComfyUI 0.3.57
- OpenAssetIO 1.0.0
- OpenAssetIO-MediaCreation 1.0.0-alpha.12
Install ComfyUI.
Clone this repository under ComfyUI/custom_nodes
.
From the repository root, install dependencies
pip install -r requirements.txt
Ensure the ComfyUI execution environment is configured correctly for an OpenAssetIO host application. See the OpenAssetIO documentation for general instructions on host application configuration.
In particular, ensure the OPENASSETIO_DEFAULT_CONFIG
environment
variable contains a path to a valid OpenAssetIO configuration file.
To install the dev dependencies and pre-commit (will run the Ruff hook), from the repository root run
pip install -e .[dev]
pre-commit install
Note that installing this project to the Python environment has no effect on ComfyUI, since it loads plugins from the
custom_nodes
directory. However, installing the package helps with IDE code completion and linting; and of course ensures test/lint dependencies are installed.
This project contains unit tests written in
pytest in the tests
directory.
To run the tests, from the repository root run
pytest tests
The project makes use of the Ruff
linter, configured through the pyproject.toml
file. To run Ruff, from
the repository root run
ruff check .
Apache-2.0 - See LICENSE file for details.
Please feel free to contribute pull requests or issues. Note that contributions will require signing a CLA.
See the OpenAssetIO contribution docs for how to structure commit messages, the pull request process, and coding style guide.