Comfy-Org / Comfy-Org/ComfyUI_frontend

Workflow duplication/save-as breaks all "app mode" inputs

Open
#14,838 1 comment 0 reactions 0 assignees View on GitHub
area:workflows browser:firefox Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
702
Avg merge
1d 8h
Merged PRs (30d)
512

Description

### Prerequisites

- [x] I am running the latest version of ComfyUI
- [ ] I have custom nodes enabled

### What happened?

Duplicating or issuing a "save as" for a workflow with an "app mode", breaks all existing inputs in the duplicated workflow's app mode.

If the duplicated workflow is viewed as an app, no inputs appear.

If the duplicated workflow "app" is edited, the inputs appear in the list of inputs in the right-hand sidebar, but cannot be deleted.

Additionally, when editing the duplicated workflow app, none of the check boxes for previously selected node widgets are ticked in the graph. Re-checking them adds a duplicate input that works until the next duplication.

### Steps to Reproduce

1. Clone ComfyUI master branch and change into cloned dir
2. Checkout known bad commit with `git checkout 563b98eefbe643a4cd510ee7f0b43e79880d5a3f` (the latest as of this bug report)
3. Install requirements with pip install -r requirements.txt
4. Open ComfyUI interface at http://127.0.0.1:8188
5. Enable nodes 2.0 under the Comfy menu.
6. In a new blank workflow, add a "load image" node and connect it to a "preview image" node.
7. Enter app mode with the button at top left corner of graph
8. Hit "build app" button.
9. Add the "image" widget from the "load image" node to the app's inputs.
10. Hit the next button at the bottom of the page and add "preview image" to outputs.
11. Hit next button at the bottom of the page and preview the app, observing that the input correctly appears in the right-hand sidebar.
12. Hit "Save as" button at bottom of the page, give the app a name, leave "App" mode as default, and hit Save. This "Save as" does NOT trigger the bug because it's really just a save.
13. Hit "view app" button in dialog that appears.
14. Observe that the "image" input correctly appears in the right-hand sidebar for this app.
15. Right-click the workflow's tab at the top of the ComfyUI interface and select "duplicate".
16. Observe that all inputs are now missing from the right-hand sidebar in the duplicated workflow.
17. Hit the "Build an app" button at the top of the page in the duplicated workflow.
18. Click "Inputs" step at the top of the app builder page.
19. Observe that the previously selected "image" input is listed in the right-hand sidebar, but cannot be deleted when hitting the ellipsis "..." button > Delete.
20. Observe that the "image" widget checkbox on the "Load Image" node in the graph is not ticked.
21. Observe that ticking the checkbox for the "image" widget adds a duplicate input to the right-hand inputs sidebar.

This duplicated workflow (or a workflow saved under a new name with right-click workflow tab > "save as". The behavior is the same) now has stuck input widgets and all previously configured inputs must be re-added.

The only way to "remove" the stuck inputs while retaining the graph is to return to graph mode, select all nodes, copy them, and paste the nodes into a new workflow. The app mode must then be rebuilt from scratch.

### How is this affecting you?

Feature doesn't work as expected

### ComfyUI Frontend Version

1.48.6

### Browser

Firefox

### Console Errors

```javascript

```

### Logs

```shell

```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue at commit 563b98eefbe643a4cd510ee7f0b43e79880d5a3f through the ComfyUI interface, using app mode, Build an app, and workflow-tab duplicate or save as. Trace the workflow duplication and app builder Inputs entry points, then verify that existing inputs and selected node-widget checkboxes persist, can be deleted, and are not duplicated after copying the workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.