Comfy-Org / Comfy-Org/ComfyUI

DynamicCombo cannot be used with GraphBuilder

Open
#12,566 1 comment 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

It should be possible to use `DynamicCombo` arguments with `GraphBuilder`.

### Actual Behavior

It is not possible to use `DynamicCombo` arguments with `GraphBuilder`.

For example, the `ResizeImageMaskNode` node has a `resize_type` argument, but when using it with `GraphBuilder` it gives the following error:

```
ResizeImageMaskNode.execute() missing 1 required positional argument: 'resize_type'

File "comfy.git/app/execution.py", line 524, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
File "comfy.git/app/execution.py", line 333, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
File "comfy.git/app/execution.py", line 307, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "comfy.git/app/execution.py", line 295, in process_inputs
result = f(**inputs)
File "comfy.git/app/comfy_api/internal/__init__.py", line 149, in wrapped_func
return method(locked_class, **inputs)
File "comfy.git/app/comfy_api/latest/_io.py", line 1748, in EXECUTE_NORMALIZED
to_return = cls.execute(*args, **kwargs
```

### Steps to Reproduce

Create this custom node:

```python
from comfy_api.latest import io
from comfy_execution.graph_utils import GraphBuilder

class TEST(io.ComfyNode):
@classmethod
def define_schema(cls) -> io.Schema:
return io.Schema(
node_id="TEST",
display_name="TEST",
category="TEST",
inputs=[],
outputs=[
io.Mask.Output(),
],
is_output_node=True,
enable_expand=True,
)

@classmethod
def execute(cls, **kwargs) -> io.NodeOutput:
graph = GraphBuilder()

mask = graph.node("SolidMask", value=1.0, width=512, height=512)

resize_type = {
"resize_type": "scale by multiplier",
"multiplier": 2.0,
}

node = graph.node(
"ResizeImageMaskNode",
resize_type=resize_type,
input=mask,
scale_method="lanczos",
)

return io.NodeOutput(node.out(0), expand=graph.finalize())
```

Then run that custom node.

### Debug Logs

```powershell
[START] Security scan
[ComfyUI-Manager] Using uv as Python module for pip operations.
Using Python 3.10.16 environment at: env
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2026-02-21 16:00:03.213
** Platform: Linux
** Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0]
** Python executable: /home/pauan/.config/pinokio/api/comfy.git/app/env/bin/python
** ComfyUI Path: /home/pauan/.config/pinokio/api/comfy.git/app
** ComfyUI Base Folder Path: /home/pauan/.config/pinokio/api/comfy.git/app
** User directory: /home/pauan/.config/pinokio/api/comfy.git/app/user
** ComfyUI-Manager config path: /home/pauan/.config/pinokio/api/comfy.git/app/user/default/ComfyUI-Manager/config.ini
** Log path: /home/pauan/.config/pinokio/api/comfy.git/app/user/comfyui.log
Using Python 3.10.16 environment at: env
Using Python 3.10.16 environment at: env

Prestartup times for custom nodes:
0.2 seconds: /home/pauan/.config/pinokio/api/comfy.git/app/custom_nodes/ComfyUI-Manager

WARNING: You need pytorch with cu130 or higher to use optimized CUDA operations.
Checkpoint files will always be loaded safely.
Total VRAM 15838 MB, total RAM 96175 MB
pytorch version: 2.7.0+cu128
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5070 Ti : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 91365.0
Using pytorch attention
Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0]
ComfyUI version: 0.14.1
ComfyUI frontend version: 1.39.14
[Prompt Server] web root: /home/pauan/.config/pinokio/api/comfy.git/app/env/lib/python3.10/site-packages/comfyui_frontend_package/static
### Loading: ComfyUI-Manager (V3.37.2)
[ComfyUI-Manager] network_mode: public
### ComfyUI Version: v0.14.1-24-g7591d781 | Released on '2026-02-21'
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.