Skip to content

Commit 98fb74b

Browse files
author
Tony Dorfmeister
committed
Merge branch 'develop'
2 parents 204a5f8 + d6a48a3 commit 98fb74b

File tree

4 files changed

+29
-27
lines changed

4 files changed

+29
-27
lines changed

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
# ayon-comfyui
22
An AYON Addon for launching ComfyUI locally via TrayLauncher.
33

4-
Loads `ComfyUI` from offical GitHub repo and comes with `ComfyUI-Manager` preconfigured.
4+
Clones `ComfyUI` from offical GitHub repo and comes with `ComfyUI-Manager` preconfigured.
5+
`uv` is used for installing all required dependencies and environment solving in a separate terminal session. This session is used to launch a local `ComfyUI` server.
56

6-
> ⚠️ **Warning:** This addon is Windows-only and depends on `uv` to be executable on your system.
7+
> ⚠️ This addon is Windows-only and depends on `uv` and `git` to be executable on your system.
78
> If `uv` is not found it will run the installation script from https://astral.sh/uv/install.ps1 for the current user.
89
10+
## Plugin and Dependency Management
11+
The addon automatically manages plugins and their dependencies to maintain a clean and reproducible ComfyUI environment.
12+
This is achieved by tracking the currently active venv against an additional temporary `.baseline-venv` containing only core ComfyUI dependencies.
13+
Any folder found in the `custom_nodes` directory that is not in the configured plugins list are automatically deleted.
14+
15+
> ⚠️ The cleanup process is automatic and cannot be disabled. Ensure your plugin configuration is correct before launching to avoid unintended plugin removal.
916
10-
It's Launcher Action uses `git` from AYON's dependency package to clone `ComfyUI` and any custom plugins that are configured.
11-
`uv` is used for installing all required dependencies and environment solving in a separate terminal session. This session is used to launch a local `ComfyUI` server.
17+
## Setup
18+
This addon requires an "Additional Application" in AYON's application settings to be created.
19+
Its `name` and `host_name` must be `comfyui`.
20+
Use the variant names to specify an available ComfyUI branch or tag. Finally, set the windows executable path to `powershell.exe`.
21+
This is to launch beforementioned separate terminal session. I know, it's a bit hacky.
22+
23+
24+
### Settings
25+
Use Extra Flags to add any custom launch flags to the webserver, e.g. `--use-cpu`.
1226

13-
## Settings
14-
> ✏️ All directory inputs support anatomy template strings and absolute paths.
27+
#### Virtual Environment Settings
28+
Configure the python version to use and whether to pull nightly PyTorch builds.
29+
You can also set a specific path to `uv` if it's not in `$PATH`.
1530

16-
### Repository Settings
31+
#### Repository Settings
1732
Configure where to pull ComfyUI sources, its target directory and additional plugins.
1833
You can specify extra dependencies to be installed as some custom nodes don't maintain a `requirements.txt`. All configured plugin dependencies will be collected and installed in a single `uv pip install`.
1934

20-
![image](https://github.com/user-attachments/assets/a7ce0a8b-edac-4727-9df2-993d90150ba6)
21-
22-
### General Settings
23-
Toggle CPU-only mode and configure custom models. Toggle extra models to consider them during launch. You can add multiple directories per model type. They will be added to the ComfyUI repo directory's `extra_model_paths.yaml`. When using `copy_to_base` the directories won't be added to the config yaml but copied into the repo base's `models/{model_type}`.
35+
#### Extra Models
36+
Toggle to define a source directory to all your custom models to consider them during launch.
37+
All found folders will be added to the ComfyUI repo directory's `extra_model_paths.yaml`. When using `copy_to_base` the directories won't be added to the config yaml but copied into the repo base's `models/{model_type}`.
2438

2539
> ⚠️ `copy_to_base` currently just blindly copies every file found in the directory. No filtering for files yet.
2640
27-
![image](https://github.com/user-attachments/assets/ac2053a8-a751-4e07-bbcf-c53bcd5527d6)
28-
29-
### Caching Settings
41+
#### Caching Settings
3042
Configure whether `uv` should use a specific cache location to read and write to. Currently only configures `UV_CACHE_DIR` during the launch script but it seems to do the job.
3143
Could be used in air-gapped scenarios.
3244

33-
34-
![image](https://github.com/user-attachments/assets/28b558ee-a4f9-4e57-9961-570104b1f8d0)
35-
36-
### Plugin and Dependency Management
37-
The addon automatically manages plugins and their dependencies to maintain a clean and reproducible ComfyUI environment.
38-
This is achieved by tracking the currently active venv against an additional temporary `.baseline-venv` containing only core ComfyUI dependencies.
39-
Any folder found in the `custom_nodes` directory that is not in the configured plugins list are automatically deleted.
40-
41-
> ⚠️ **Note:** The cleanup process is automatic and cannot be disabled. Ensure your plugin configuration is correct before launching to avoid unintended plugin removal.

client/ayon_comfyui/hooks/pre_launch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ def git_clone(url: str, dest: Path, tag: str = "") -> git.Repo:
252252
plugin_name = Path(plugin["url"]).stem
253253
progress_callback(f"Setting up Plugin: {plugin_name}")
254254
plugin_root = self.comfy_root / "custom_nodes" / plugin_name
255-
plugin.update({"root": plugin_root})
256255
git_clone(
257256
url=plugin["url"],
258257
dest=plugin_root,
@@ -322,7 +321,7 @@ def run_server(self):
322321
launch_args.append(self.uv_path)
323322
if self.plugins:
324323
launch_args.append("-plugins")
325-
plugin_names = [plugin["root"].name for plugin in self.plugins]
324+
plugin_names = [Path(plugin["url"]).stem for plugin in self.plugins]
326325
launch_args.append(",".join(plugin_names))
327326
if self.extra_dependencies:
328327
launch_args.append("-extraDependencies")

client/ayon_comfyui/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22
"""Package declaring ComfyUI addon version."""
3-
__version__ = "0.0.6"
3+
__version__ = "0.0.7-dev"

package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "comfyui"
22
title = "ComfyUI"
3-
version = "0.0.6"
3+
version = "0.0.7-dev"
44

55
client_dir = "ayon_comfyui"
66

0 commit comments

Comments
 (0)