If a file with the same name already exists in another directory, the file won't be saved. What's worse, it appears on the screen as if it had been saved.

Open
#17,832 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, frontend

Research direction

Start by tracing how ComfyUI identifies and saves workflows when Ctrl+S is pressed, then check whether the save path distinguishes files with the same name in different directories. Reproduce the steps with two folders containing wf_abc.json and verify whether each workflow saves independently. The issue does not name the relevant files or tests, so first locate the save handler and its existing coverage.

Written by the indexing model from the issue text.

Description

Potential Bug
Custom Node Testing
Expected Behavior

Press Ctrl+S to save and overwrite.

Actual Behavior

If a file with the same name exists in another directory, it will not be saved. To make matters worse, it appears on the screen as if it has been saved.

Example:
Workflow
 └ folder-a
  └ wf_abc.json
 └ folder-b
  └ wf_abc.json

wf_abc.json will not be saved in either directory.

Steps to Reproduce
  1. Create a sample workflow file in ComfyUI and save it. For this example, let’s name the file wf_abc.json.

  2. Place it in the following location using Windows Explorer:
    workflow
     └ folder-a
      └ wf_abc.json
     └ folder-b
      └ wf_abc.json

  3. In ComfyUI, open wf_abc.json in folder-a, make some changes to the workflow, and save it by pressing Ctrl+S.

  4. Next, in ComfyUI, open wf_abc.json in folder-b, make some changes to the workflow, and save it by pressing Ctrl+S.

  5. When you open wf_abc.json, you’ll find that only one of the two versions has been saved.

Debug Logs
none
Other

(The post I made a few days ago titled “Unable to Overwrite Files with Japanese 2-Byte Characters” was incorrect. I’m sorry. It seems the cause was actually this.)

Dominant language
Python
Stars
150k
Forks
17.9k
Avg merge
1d 1h
Merged PRs (30d)
181

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/ComfyUI

All issues in Comfy-Org/ComfyUI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.