|
| 1 | +# OpenAssetIO-ComfyUI |
| 2 | + |
| 3 | +OpenAssetIO ingress and egress |
| 4 | + |
| 5 | +> [!NOTE] |
| 6 | +> This projected was created with a [cookiecutter](https://github.com/Comfy-Org/cookiecutter-comfy-extension) template. It helps you start writing custom nodes without worrying about the Python setup. |
| 7 | +
|
| 8 | +## Quickstart |
| 9 | + |
| 10 | +1. Install [ComfyUI](https://docs.comfy.org/get_started). |
| 11 | +1. Install [ComfyUI-Manager](https://github.com/ltdrdata/ComfyUI-Manager) |
| 12 | +1. Look up this extension in ComfyUI-Manager. If you are installing manually, clone this repository under `ComfyUI/custom_nodes`. |
| 13 | +1. Restart ComfyUI. |
| 14 | + |
| 15 | +# Features |
| 16 | + |
| 17 | +- A list of features |
| 18 | + |
| 19 | +## Develop |
| 20 | + |
| 21 | +To install the dev dependencies and pre-commit (will run the ruff hook), do: |
| 22 | + |
| 23 | +```bash |
| 24 | +cd openassetio-comfyui |
| 25 | +pip install -e .[dev] |
| 26 | +pre-commit install |
| 27 | +``` |
| 28 | + |
| 29 | +The `-e` flag above will result in a "live" install, in the sense that any changes you make to your node extension will automatically be picked up the next time you run ComfyUI. |
| 30 | + |
| 31 | +## Publish to Github |
| 32 | + |
| 33 | +Install Github Desktop or follow these [instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) for ssh. |
| 34 | + |
| 35 | +1. Create a Github repository that matches the directory name. |
| 36 | +2. Push the files to Git |
| 37 | +``` |
| 38 | +git add . |
| 39 | +git commit -m "project scaffolding" |
| 40 | +git push |
| 41 | +``` |
| 42 | + |
| 43 | +## Writing custom nodes |
| 44 | + |
| 45 | +An example custom node is located in [node.py](src/openassetio-comfyui/nodes.py). To learn more, read the [docs](https://docs.comfy.org/essentials/custom_node_overview). |
| 46 | + |
| 47 | + |
| 48 | +## Tests |
| 49 | + |
| 50 | +This repo contains unit tests written in Pytest in the `tests/` directory. It is recommended to unit test your custom node. |
| 51 | + |
| 52 | +- [build-pipeline.yml](.github/workflows/build-pipeline.yml) will run pytest and linter on any open PRs |
| 53 | +- [validate.yml](.github/workflows/validate.yml) will run [node-diff](https://github.com/Comfy-Org/node-diff) to check for breaking changes |
| 54 | + |
| 55 | +## Publishing to Registry |
| 56 | + |
| 57 | +If you wish to share this custom node with others in the community, you can publish it to the registry. We've already auto-populated some fields in `pyproject.toml` under `tool.comfy`, but please double-check that they are correct. |
| 58 | + |
| 59 | +You need to make an account on https://registry.comfy.org and create an API key token. |
| 60 | + |
| 61 | +- [ ] Go to the [registry](https://registry.comfy.org). Login and create a publisher id (everything after the `@` sign on your registry profile). |
| 62 | +- [ ] Add the publisher id into the pyproject.toml file. |
| 63 | +- [ ] Create an api key on the Registry for publishing from Github. [Instructions](https://docs.comfy.org/registry/publishing#create-an-api-key-for-publishing). |
| 64 | +- [ ] Add it to your Github Repository Secrets as `REGISTRY_ACCESS_TOKEN`. |
| 65 | + |
| 66 | +A Github action will run on every git push. You can also run the Github action manually. Full instructions [here](https://docs.comfy.org/registry/publishing). Join our [discord](https://discord.com/invite/comfyorg) if you have any questions! |
| 67 | + |
0 commit comments