Compare commits

..

7 Commits

Author SHA1 Message Date
Jedrzej Kosinski
b6d1593574 Merge branch 'master' into ben/release-webhook-dispatch-desktop 2026-02-11 10:58:52 -08:00
Alexander Piskun
2c7cef4a23 fix(api-nodes): retry on connection errors during polling instead of aborting (#12393) 2026-02-11 10:51:49 -08:00
Jedrzej Kosinski
45df7c8fa5 Merge branch 'master' into ben/release-webhook-dispatch-desktop 2026-02-10 21:57:16 -06:00
Luke Mino-Altherr
53d161b106 Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-10 19:57:00 -08:00
Benjamin Lu
9329c710b5 Require desktop dispatch token in release webhook 2026-02-10 19:50:03 -08:00
Benjamin Lu
0c4affdf48 Fix release webhook secret checks in step conditions 2026-02-10 18:27:26 -08:00
Benjamin Lu
8412b5b048 Dispatch desktop auto-bump on ComfyUI release publish 2026-02-10 14:06:44 -08:00
5 changed files with 40 additions and 85 deletions

View File

@@ -7,6 +7,8 @@ on:
jobs:
send-webhook:
runs-on: ubuntu-latest
env:
DESKTOP_REPO_DISPATCH_TOKEN: ${{ secrets.DESKTOP_REPO_DISPATCH_TOKEN }}
steps:
- name: Send release webhook
env:
@@ -106,3 +108,37 @@ jobs:
--fail --silent --show-error
echo "✅ Release webhook sent successfully"
- name: Send repository dispatch to desktop
env:
DISPATCH_TOKEN: ${{ env.DESKTOP_REPO_DISPATCH_TOKEN }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_URL: ${{ github.event.release.html_url }}
run: |
set -euo pipefail
if [ -z "${DISPATCH_TOKEN:-}" ]; then
echo "::error::DESKTOP_REPO_DISPATCH_TOKEN is required but not set."
exit 1
fi
PAYLOAD="$(jq -n \
--arg release_tag "$RELEASE_TAG" \
--arg release_url "$RELEASE_URL" \
'{
event_type: "comfyui_release_published",
client_payload: {
release_tag: $release_tag,
release_url: $release_url
}
}')"
curl -fsSL \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DISPATCH_TOKEN}" \
https://api.github.com/repos/Comfy-Org/desktop/dispatches \
-d "$PAYLOAD"
echo "✅ Dispatched ComfyUI release ${RELEASE_TAG} to Comfy-Org/desktop"

View File

@@ -30,46 +30,6 @@ from comfy_execution.graph_utils import ExecutionBlocker
from ._util import MESH, VOXEL, SVG as _SVG, File3D
class EmptyInputSentinel:
"""
Sentinel class indicating an empty/missing input.
Use the class itself (not an instance) as the sentinel.
Compare using 'is' or 'is not' only.
"""
def __new__(cls):
raise TypeError("EmptyInputSentinel cannot be instantiated, use the class itself")
def __init_subclass__(cls, **kwargs):
raise TypeError("EmptyInputSentinel cannot be subclassed")
@classmethod
def __class_getitem__(cls, item):
raise TypeError("EmptyInputSentinel cannot be subscripted")
def __repr__(self):
return "<EmptyInput>"
def __bool__(self):
raise TypeError("EmptyInputSentinel cannot be used in boolean context")
def __eq__(self, other):
raise TypeError("EmptyInputSentinel cannot be compared with ==, use 'is' instead")
def __ne__(self, other):
raise TypeError("EmptyInputSentinel cannot be compared with !=, use 'is not' instead")
def __hash__(self):
raise TypeError("EmptyInputSentinel cannot be hashed")
def __iter__(self):
raise TypeError("EmptyInputSentinel cannot be iterated")
def __len__(self):
raise TypeError("EmptyInputSentinel has no length")
class FolderType(str, Enum):
input = "input"
output = "output"
@@ -2150,7 +2110,6 @@ __all__ = [
"DynamicCombo",
"Autogrow",
# Other classes
"EmptyInputSentinel",
"HiddenHolder",
"Hidden",
"NodeInfoV1",

View File

@@ -143,9 +143,9 @@ async def poll_op(
poll_interval: float = 5.0,
max_poll_attempts: int = 160,
timeout_per_poll: float = 120.0,
max_retries_per_poll: int = 3,
max_retries_per_poll: int = 10,
retry_delay_per_poll: float = 1.0,
retry_backoff_per_poll: float = 2.0,
retry_backoff_per_poll: float = 1.4,
estimated_duration: int | None = None,
cancel_endpoint: ApiEndpoint | None = None,
cancel_timeout: float = 10.0,
@@ -240,9 +240,9 @@ async def poll_op_raw(
poll_interval: float = 5.0,
max_poll_attempts: int = 160,
timeout_per_poll: float = 120.0,
max_retries_per_poll: int = 3,
max_retries_per_poll: int = 10,
retry_delay_per_poll: float = 1.0,
retry_backoff_per_poll: float = 2.0,
retry_backoff_per_poll: float = 1.4,
estimated_duration: int | None = None,
cancel_endpoint: ApiEndpoint | None = None,
cancel_timeout: float = 10.0,

View File

@@ -91,41 +91,6 @@ class SoftSwitchNode(io.ComfyNode):
return io.NodeOutput(on_true if switch else on_false)
class OptionalSwitchNode(io.ComfyNode):
@classmethod
def define_schema(cls):
template = io.MatchType.Template("switch")
return io.Schema(
node_id="ComfyOptionalSwitchNode",
display_name="Optional Switch",
category="logic",
is_experimental=True,
inputs=[
io.Boolean.Input("switch"),
io.MatchType.Input("on_false", template=template, lazy=True, optional=True),
io.MatchType.Input("on_true", template=template, lazy=True, optional=True),
],
outputs=[
io.MatchType.Output(template=template, display_name="output"),
],
)
@classmethod
def check_lazy_status(cls, switch, on_false=MISSING, on_true=MISSING):
# Only evaluate the input that corresponds to the switch value
if switch and on_true is None:
return ["on_true"]
if not switch and on_false is None:
return ["on_false"]
@classmethod
def execute(cls, switch, on_true=MISSING, on_false=MISSING) -> io.NodeOutput:
selected = on_true if switch else on_false
if selected is MISSING:
return io.NodeOutput(io.EmptyInputSentinel)
return io.NodeOutput(selected)
class CustomComboNode(io.ComfyNode):
"""
Frontend node that allows user to write their own options for a combo.
@@ -295,7 +260,6 @@ class LogicExtension(ComfyExtension):
async def get_node_list(self) -> list[type[io.ComfyNode]]:
return [
SwitchNode,
OptionalSwitchNode,
CustomComboNode,
# SoftSwitchNode,
# ConvertStringToComboNode,

View File

@@ -980,10 +980,6 @@ async def validate_inputs(prompt_id, prompt, item, validated):
input_filtered[x] = input_data_all[x]
if 'input_types' in validate_function_inputs:
input_filtered['input_types'] = [received_types]
for x in list(input_filtered.keys()):
if input_filtered[x] is io.EmptyInputSentinel:
del input_filtered[x]
ret = await _async_map_node_over_list(prompt_id, unique_id, obj_class, input_filtered, validate_function_name, v3_data=v3_data)
ret = await resolve_map_node_over_list_results(ret)