Skip to content

Commit 7ec1656

Browse files
authored
Merge branch 'comfyanonymous:master' into offloader-maifee
2 parents cee75f3 + 329480d commit 7ec1656

File tree

96 files changed

+5413
-1622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+5413
-1622
lines changed

.ci/update_windows/update.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ def pull(repo, remote_name='origin', branch='master'):
6666
try:
6767
ref = repo.lookup_reference('refs/remotes/origin/master')
6868
except:
69-
print("pulling.") # noqa: T201
70-
pull(repo)
69+
print("fetching.") # noqa: T201
70+
for remote in repo.remotes:
71+
if remote.name == "origin":
72+
remote.fetch()
7173
ref = repo.lookup_reference('refs/remotes/origin/master')
7274
repo.checkout(ref)
7375
branch = repo.lookup_branch('master')
@@ -149,3 +151,4 @@ def file_size(f):
149151
shutil.copy(stable_update_script, stable_update_script_to)
150152
except:
151153
pass
154+

.ci/windows_amd_base_files/README_VERY_IMPORTANT.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
As of the time of writing this you need this preview driver for best results:
2-
https://www.amd.com/en/resources/support-articles/release-notes/RN-AMDGPU-WINDOWS-PYTORCH-PREVIEW.html
1+
As of the time of writing this you need this driver for best results:
2+
https://www.amd.com/en/resources/support-articles/release-notes/RN-AMDGPU-WINDOWS-PYTORCH-7-1-1.html
33

44
HOW TO RUN:
55

@@ -25,3 +25,4 @@ In the ComfyUI directory you will find a file: extra_model_paths.yaml.example
2525
Rename this file to: extra_model_paths.yaml and edit it with your favorite text editor.
2626

2727

28+

.github/workflows/release-stable-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ jobs:
6565
contents: "write"
6666
packages: "write"
6767
pull-requests: "read"
68-
name: "Release AMD ROCm 6.4.4"
68+
name: "Release AMD ROCm 7.1.1"
6969
uses: ./.github/workflows/stable-release.yml
7070
with:
7171
git_tag: ${{ inputs.git_tag }}
72-
cache_tag: "rocm644"
72+
cache_tag: "rocm711"
7373
python_minor: "12"
7474
python_patch: "10"
7575
rel_name: "amd"

CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# Admins
2-
* @comfyanonymous
3-
* @kosinkadink
2+
* @comfyanonymous @kosinkadink @guill

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ See what ComfyUI can do with the [example workflows](https://comfyanonymous.gith
8181
- [Hunyuan Video](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/)
8282
- [Wan 2.1](https://comfyanonymous.github.io/ComfyUI_examples/wan/)
8383
- [Wan 2.2](https://comfyanonymous.github.io/ComfyUI_examples/wan22/)
84+
- [Hunyuan Video 1.5](https://docs.comfy.org/tutorials/video/hunyuan/hunyuan-video-1-5)
8485
- Audio Models
8586
- [Stable Audio](https://comfyanonymous.github.io/ComfyUI_examples/audio/)
8687
- [ACE Step](https://comfyanonymous.github.io/ComfyUI_examples/audio/)
@@ -319,6 +320,32 @@ For models compatible with Iluvatar Extension for PyTorch. Here's a step-by-step
319320
1. Install the Iluvatar Corex Toolkit by adhering to the platform-specific instructions on the [Installation](https://support.iluvatar.com/#/DocumentCentre?id=1&nameCenter=2&productId=520117912052801536)
320321
2. Launch ComfyUI by running `python main.py`
321322

323+
324+
## [ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager/tree/manager-v4)
325+
326+
**ComfyUI-Manager** is an extension that allows you to easily install, update, and manage custom nodes for ComfyUI.
327+
328+
### Setup
329+
330+
1. Install the manager dependencies:
331+
```bash
332+
pip install -r manager_requirements.txt
333+
```
334+
335+
2. Enable the manager with the `--enable-manager` flag when running ComfyUI:
336+
```bash
337+
python main.py --enable-manager
338+
```
339+
340+
### Command Line Options
341+
342+
| Flag | Description |
343+
|------|-------------|
344+
| `--enable-manager` | Enable ComfyUI-Manager |
345+
| `--enable-manager-legacy-ui` | Use the legacy manager UI instead of the new UI (requires `--enable-manager`) |
346+
| `--disable-manager-ui` | Disable the manager UI and endpoints while keeping background features like security checks and scheduled installation completion (requires `--enable-manager`) |
347+
348+
322349
# Running
323350

324351
```python main.py```

app/user_manager.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,26 @@ def get_request_user_id(self, request):
5959
user = "default"
6060
if args.multi_user and "comfy-user" in request.headers:
6161
user = request.headers["comfy-user"]
62+
# Block System Users (use same error message to prevent probing)
63+
if user.startswith(folder_paths.SYSTEM_USER_PREFIX):
64+
raise KeyError("Unknown user: " + user)
6265

6366
if user not in self.users:
6467
raise KeyError("Unknown user: " + user)
6568

6669
return user
6770

6871
def get_request_user_filepath(self, request, file, type="userdata", create_dir=True):
69-
user_directory = folder_paths.get_user_directory()
70-
7172
if type == "userdata":
72-
root_dir = user_directory
73+
root_dir = folder_paths.get_user_directory()
7374
else:
7475
raise KeyError("Unknown filepath type:" + type)
7576

7677
user = self.get_request_user_id(request)
77-
path = user_root = os.path.abspath(os.path.join(root_dir, user))
78+
user_root = folder_paths.get_public_user_directory(user)
79+
if user_root is None:
80+
return None
81+
path = user_root
7882

7983
# prevent leaving /{type}
8084
if os.path.commonpath((root_dir, user_root)) != root_dir:
@@ -101,7 +105,11 @@ def add_user(self, name):
101105
name = name.strip()
102106
if not name:
103107
raise ValueError("username not provided")
108+
if name.startswith(folder_paths.SYSTEM_USER_PREFIX):
109+
raise ValueError("System User prefix not allowed")
104110
user_id = re.sub("[^a-zA-Z0-9-_]+", '-', name)
111+
if user_id.startswith(folder_paths.SYSTEM_USER_PREFIX):
112+
raise ValueError("System User prefix not allowed")
105113
user_id = user_id + "_" + str(uuid.uuid4())
106114

107115
self.users[user_id] = name
@@ -132,7 +140,10 @@ async def post_users(request):
132140
if username in self.users.values():
133141
return web.json_response({"error": "Duplicate username."}, status=400)
134142

135-
user_id = self.add_user(username)
143+
try:
144+
user_id = self.add_user(username)
145+
except ValueError as e:
146+
return web.json_response({"error": str(e)}, status=400)
136147
return web.json_response(user_id)
137148

138149
@routes.get("/userdata")
@@ -424,7 +435,7 @@ async def move_userdata(request):
424435
return source
425436

426437
dest = get_user_data_path(request, check_exists=False, param="dest")
427-
if not isinstance(source, str):
438+
if not isinstance(dest, str):
428439
return dest
429440

430441
overwrite = request.query.get("overwrite", 'true') != "false"

comfy/cli_args.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ class LatentPreviewMethod(enum.Enum):
121121
upcast.add_argument("--dont-upcast-attention", action="store_true", help="Disable all upcasting of attention. Should be unnecessary except for debugging.")
122122

123123

124+
parser.add_argument("--enable-manager", action="store_true", help="Enable the ComfyUI-Manager feature.")
125+
manager_group = parser.add_mutually_exclusive_group()
126+
manager_group.add_argument("--disable-manager-ui", action="store_true", help="Disables only the ComfyUI-Manager UI and endpoints. Scheduled installations and similar background tasks will still operate.")
127+
manager_group.add_argument("--enable-manager-legacy-ui", action="store_true", help="Enables the legacy UI of ComfyUI-Manager")
128+
129+
124130
vram_group = parser.add_mutually_exclusive_group()
125131
vram_group.add_argument("--gpu-only", action="store_true", help="Store and run everything (text encoders/CLIP models, etc... on the GPU).")
126132
vram_group.add_argument("--highvram", action="store_true", help="By default models will be unloaded to CPU memory after being used. This option keeps them in GPU memory.")
@@ -131,7 +137,8 @@ class LatentPreviewMethod(enum.Enum):
131137

132138
parser.add_argument("--reserve-vram", type=float, default=None, help="Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reserved depending on your OS.")
133139

134-
parser.add_argument("--async-offload", action="store_true", help="Use async weight offloading.")
140+
parser.add_argument("--async-offload", nargs='?', const=2, type=int, default=None, metavar="NUM_STREAMS", help="Use async weight offloading. An optional argument controls the amount of offload streams. Default is 2. Enabled by default on Nvidia.")
141+
parser.add_argument("--disable-async-offload", action="store_true", help="Disable async weight offloading.")
135142

136143
parser.add_argument("--force-non-blocking", action="store_true", help="Force ComfyUI to use non-blocking operations for all applicable tensors. This may improve performance on some non-Nvidia systems but can cause issues with some workflows.")
137144

@@ -178,6 +185,7 @@ class PerformanceFeature(enum.Enum):
178185
parser.add_argument("--verbose", default='INFO', const='DEBUG', nargs="?", choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], help='Set the logging level')
179186
parser.add_argument("--log-stdout", action="store_true", help="Send normal process output to stdout instead of stderr (default).")
180187

188+
181189
# The default built-in provider hosted under web/
182190
DEFAULT_VERSION_STRING = "comfyanonymous/ComfyUI@latest"
183191

0 commit comments

Comments
 (0)