mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-08 08:17:24 +08:00
Compare commits
10 Commits
v0.24.1
...
feat/suppo
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a89f8340a | |||
| 4e1f7cb1db | |||
| 6ecca5f468 | |||
| 27b5c423a6 | |||
| 1f9e7df52a | |||
| 0a92dd9c09 | |||
| 4d360f9c9d | |||
| 4f99ce0f8c | |||
| 7758b9b321 | |||
| bb84c75283 |
@ -25,6 +25,11 @@ CLI_FEATURE_FLAG_REGISTRY: dict[str, FeatureFlagInfo] = {
|
||||
"default": False,
|
||||
"description": "Show the sign-in button in the frontend even when not signed in",
|
||||
},
|
||||
"supports_terminal": {
|
||||
"type": "bool",
|
||||
"default": False,
|
||||
"description": "An interactive terminal host is available for this server (e.g. ComfyUI Desktop), so the frontend may surface a terminal/console UI",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -411,6 +411,21 @@ class ImageProcessingNode(io.ComfyNode):
|
||||
|
||||
return has_group
|
||||
|
||||
@classmethod
|
||||
def _ensure_image_list(cls, images):
|
||||
"""Normalize to a flat list of [1, H, W, C] tensors."""
|
||||
if isinstance(images, torch.Tensor):
|
||||
if images.ndim != 4:
|
||||
raise ValueError(f"Expected 4D image tensor, got shape {tuple(images.shape)}")
|
||||
return [images[i:i+1] for i in range(images.shape[0])]
|
||||
|
||||
flat = []
|
||||
for item in images:
|
||||
if not isinstance(item, torch.Tensor) or item.ndim != 4:
|
||||
raise ValueError(f"Expected 4D image tensor, got {type(item).__name__} shape {getattr(item, 'shape', None)}")
|
||||
flat.extend([item[i:i+1] for i in range(item.shape[0])])
|
||||
return flat
|
||||
|
||||
@classmethod
|
||||
def define_schema(cls):
|
||||
if cls.node_id is None:
|
||||
@ -458,6 +473,9 @@ class ImageProcessingNode(io.ComfyNode):
|
||||
"""Execute the node. Routes to _process or _group_process based on mode."""
|
||||
is_group = cls._detect_processing_mode()
|
||||
|
||||
if is_group:
|
||||
images = cls._ensure_image_list(images)
|
||||
|
||||
# Extract scalar values from lists for parameters
|
||||
params = {}
|
||||
for k, v in kwargs.items():
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# This file is automatically generated by the build process when version is
|
||||
# updated in pyproject.toml.
|
||||
__version__ = "0.24.1"
|
||||
__version__ = "0.24.0"
|
||||
|
||||
16661
openapi.yaml
16661
openapi.yaml
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "ComfyUI"
|
||||
version = "0.24.1"
|
||||
version = "0.24.0"
|
||||
readme = "README.md"
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">=3.10"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
comfyui-frontend-package==1.44.19
|
||||
comfyui-frontend-package==1.45.15
|
||||
comfyui-workflow-templates==0.9.98
|
||||
comfyui-embedded-docs==0.5.2
|
||||
torch
|
||||
|
||||
@ -181,3 +181,12 @@ class TestCliFeatureFlagRegistry:
|
||||
assert "type" in info, f"{key} missing 'type'"
|
||||
assert "default" in info, f"{key} missing 'default'"
|
||||
assert "description" in info, f"{key} missing 'description'"
|
||||
|
||||
def test_supports_terminal_registered_as_bool(self):
|
||||
"""supports_terminal must be a registered bool so --feature-flag
|
||||
supports_terminal=true coerces to a real boolean. The frontend gates
|
||||
on a strict `=== true` check, so a raw string 'true' would not work."""
|
||||
assert "supports_terminal" in CLI_FEATURE_FLAG_REGISTRY
|
||||
assert CLI_FEATURE_FLAG_REGISTRY["supports_terminal"]["type"] == "bool"
|
||||
assert _coerce_flag_value("supports_terminal", "true") is True
|
||||
assert _coerce_flag_value("supports_terminal", "false") is False
|
||||
|
||||
Reference in New Issue
Block a user