Skip to content

[Bug]: Subgraph input connections are disconnected when a new subgraph is created in a subgraph #4238

Closed
@LevelPixel

Description

@LevelPixel

Custom Node Testing

Frontend Version

ComfyUI_frontend v1.22.2-sub.9

Expected Behavior

When creating a subgraph within a subgraph, connections from the input pins of the current subgraph must not be disconnected.

Actual Behavior

Subgraph input connections are disconnected when a new subgraph is created in a subgraph when nodes connected to the subgraph input pins are selected.
Before creating a subgraph:
Image

After creating a subgraph:
Image

Steps to Reproduce

Make a subgraph
Go inside the subgraph
Select the nodes connected to the input pins of the subgraph
Convert them into a new subgraph

Debug Logs

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --windows-standalone-build --disable-auto-launch --front-end-version Comfy-Org/ComfyUI_frontend@prerelease --fast fp16_accumulation
Checkpoint files will always be loaded safely.
Total VRAM 10240 MB, total RAM 16209 MB
pytorch version: 2.7.1+cu128
Enabled fp16 accumulation.
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080 : cudaMallocAsync
Using pytorch attention
Python version: 3.12.10 (tags/v3.12.10:0cc8128, Apr  8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]
ComfyUI version: 0.3.41
Initializing frontend: Comfy-Org/ComfyUI_frontend@prerelease, requesting version details from GitHub...
[Prompt Server] web root: F:\AIWork\AITools\_Test_ComfyUI\ComfyUI\web_custom_versions\Comfy-Org_ComfyUI_frontend\1.22.2-sub.9

Import times for custom nodes:
   0.0 seconds: F:\AIWork\AITools\_Test_ComfyUI\ComfyUI\custom_nodes\websocket_image_save.py

Context impl SQLiteImpl.
Will assume non-transactional DDL.
No target revision found.
Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
model weight dtype torch.float16, manual cast: None
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load SDXLClipModel
loaded completely 9.5367431640625e+25 1560.802734375 True
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16
loaded diffusion model directly to GPU
Requested to load SDXL
loaded completely 9.5367431640625e+25 4897.0483474731445 True
Requested to load SDXLClipModel
loaded completely 2744.7037399291994 1560.802734375 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  8.07it/s]
Requested to load AutoencoderKL
loaded completely 650.1283416748047 159.55708122253418 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.27it/s]
Prompt executed in 24.86 seconds
got prompt
loaded completely 7412.108073043823 4897.0483474731445 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.02it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.25it/s]
Prompt executed in 9.75 seconds
got prompt
loaded completely 7412.108073043823 4897.0483474731445 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.31it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.32it/s]
Prompt executed in 9.49 seconds
got prompt
loaded completely 7412.108073043823 4897.0483474731445 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 10.29it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.25it/s]
Prompt executed in 9.76 seconds
got prompt
loaded completely 7412.108073043823 4897.0483474731445 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  9.74it/s]
  0%|                                                                                                                                                                                                         | 0/20 [00:00<?, ?it/s]got prompt
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.03it/s]
Prompt executed in 10.48 seconds
loaded completely 7412.108073043823 4897.0483474731445 True
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 10.55it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.08it/s]
Prompt executed in 9.96 seconds

Browser Logs

Image

Setting JSON

comfy.settings.json

What browsers do you use to access the UI ?

Google Chrome

Other Information

The latest version of ComfyUI is used (git clone repostory, not realeses) and the --front-end-version version is Comfy-Org/ComfyUI_frontend@prerelease

Everything is installed from scratch
No Custom nodes or previous libraries and language versions.

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions