Skip to content

OpenAssetIO/OpenAssetIO-ComfyUI

Repository files navigation

OpenAssetIO-ComfyUI

What

Custom ComfyUI nodes for resolving and publishing assets directly from a workflow via OpenAssetIO.

Why

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.

Features

  • 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.

Requirements

The plugin is known to work with

Installation

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.

Development

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.

Running Tests

This project contains unit tests written in pytest in the tests directory. To run the tests, from the repository root run

pytest tests

Linting

The project makes use of the Ruff linter, configured through the pyproject.toml file. To run Ruff, from the repository root run

ruff check .

License

Apache-2.0 - See LICENSE file for details.

Contributing

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.

About

ComfyUI custom nodes adding asset resolution and publishing via OpenAssetIO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages