Skip to content

pyisolate-support release refresh#13380

Merged
pollockjj merged 5 commits intoComfy-Org:pyisolate-supportfrom
pollockjj:issue61-clean-pyisolate-support
Apr 13, 2026
Merged

pyisolate-support release refresh#13380
pollockjj merged 5 commits intoComfy-Org:pyisolate-supportfrom
pollockjj:issue61-clean-pyisolate-support

Conversation

@pollockjj
Copy link
Copy Markdown

Refresh pyisolate-support from the validated clean release branch.

This PR is the upstream submission of the same clean branch that already passed the local merge validation, clean-branch gate, and fork trial PR sweep.

Validation chain:

  • Slice 2: post-merge issue branch passed tests/isolation and full 8/8/8
  • Slice 3: clean re-squashed branch preserved release content and passed tests/isolation and full 8/8/8
  • Slice 4: fork trial PR cleared required checks and automated review sweep on head 59937d0
    Branch head: 59937d0

Copilot AI review requested due to automatic review settings April 13, 2026 02:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refreshes the repo’s pyisolate-support integration to align with the latest validated “clean release” branch, updating isolation plumbing (routing + manifest options), bumping the pyisolate dependency, and removing deprecated sealed-worker 3D output types/nodes.

Changes:

  • Bump pyisolate to 0.10.2 and propagate new isolation manifest config fields (share_torch_no_deps, extra_index_urls).
  • Rework isolated PromptServer route registration to buffer in-child and flush to host, including bridging legacy module-level ROUTES.
  • Remove deprecated SavePLY/SaveNPZ nodes and sealed-worker PLY/NPZ types; add/adjust isolation tests for new behaviors.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/isolation/test_inner_model_state_dict.py Adds coverage that isolated inner model exposes state_dict() for LoRA key discovery.
tests/isolation/test_cuda_wheels_and_env_flags.py Extends manifest plumbing tests for new isolation config fields and route buffering behavior.
tests/isolation/singleton_boundary_helpers.py Updates exact-relay helper to reset/flush buffered child routes during capture.
requirements.txt Bumps pyisolate pin to 0.10.2.
nodes.py Stops loading removed extra-node modules (nodes_save_ply.py, nodes_save_npz.py).
comfy/isolation/proxies/prompt_server_impl.py Buffers route registrations in child and introduces flush-to-host; adds app stub for compatibility.
comfy/isolation/proxies/folder_paths_proxy.py Removes verbose diagnostic logging from get_filename_list.
comfy/isolation/model_patcher_proxy.py Exposes state_dict on _InnerModelProxy by delegating to model_state_dict().
comfy/isolation/host_policy.py Exports sandbox mode to PYISOLATE_SANDBOX_MODE env var when loading host policy.
comfy/isolation/extension_wrapper.py Bridges legacy ROUTES declarations and adds flush_pending_routes() for host-triggered flush.
comfy/isolation/extension_loader.py Plumbs new manifest config keys and triggers route flushing on cache-hit and cache-miss discovery paths.
comfy/isolation/child_hooks.py Removes DIAG logs; adjusts error message prefix.
comfy/isolation/adapter.py Updates PromptServer wiring to use PromptServerService/PromptServerStub; removes old numpy serializer block.
comfy/isolation/init.py Removes DIAG logs from proxy initialization.
comfy_extras/nodes_save_ply.py Removes deprecated PLY output node.
comfy_extras/nodes_save_npz.py Removes deprecated NPZ output node.
comfy_api_sealed_worker/ply_types.py Removes sealed-worker PLY type.
comfy_api_sealed_worker/npz_types.py Removes sealed-worker NPZ type.
comfy_api_sealed_worker/init.py Updates exports/docstring to reflect removed PLY/NPZ types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

raise ExtensionLoadError(
"[tool.comfy.isolation.share_torch_no_deps] must be a list of non-empty strings"
)
extension_config["share_torch_no_deps"] = share_torch_no_deps
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation checks dep.strip() but then stores the original share_torch_no_deps values unchanged. This can leave leading/trailing whitespace in dependency names (e.g., " timm "), which may later fail matching/installation. Consider normalizing by stripping each entry (and optionally de-duplicating) before writing to extension_config.

Suggested change
extension_config["share_torch_no_deps"] = share_torch_no_deps
extension_config["share_torch_no_deps"] = [dep.strip() for dep in share_torch_no_deps]

Copilot uses AI. Check for mistakes.
):
raise ExtensionLoadError(
"[tool.comfy.isolation.extra_index_urls] must be a list of non-empty strings"
)
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to share_torch_no_deps, the validation checks u.strip() but stores the original extra_index_urls strings unchanged. To avoid subtle issues from whitespace-only differences, normalize (strip) entries (and optionally de-duplicate) before adding them to extension_config.

Suggested change
)
)
extra_index_urls = list(dict.fromkeys(u.strip() for u in extra_index_urls))

Copilot uses AI. Check for mistakes.
Comment on lines +154 to +160
for method, path, handler in cls._pending_child_routes:
try:
await cls._rpc.register_route_rpc(method, path, handler)
flushed += 1
except Exception as e:
logger.error("%s Child route flush failed %s %s: %s", LOG_PREFIX, method, path, e)
cls._pending_child_routes = []
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flush_child_routes() clears _pending_child_routes even if one or more registrations fail (exceptions are logged but the route is dropped). That can permanently lose route registrations in transient failure scenarios. Consider only removing entries that were successfully flushed, or retaining failed entries for retry and returning counts for (flushed, failed).

Suggested change
for method, path, handler in cls._pending_child_routes:
try:
await cls._rpc.register_route_rpc(method, path, handler)
flushed += 1
except Exception as e:
logger.error("%s Child route flush failed %s %s: %s", LOG_PREFIX, method, path, e)
cls._pending_child_routes = []
failed_routes = []
for method, path, handler in cls._pending_child_routes:
try:
await cls._rpc.register_route_rpc(method, path, handler)
flushed += 1
except Exception as e:
logger.error("%s Child route flush failed %s %s: %s", LOG_PREFIX, method, path, e)
failed_routes.append((method, path, handler))
cls._pending_child_routes = failed_routes

Copilot uses AI. Check for mistakes.
@pollockjj pollockjj merged commit ea092cd into Comfy-Org:pyisolate-support Apr 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants