Sign In

ComfyUI workflow updater (update values of nodes from old workflow)

2

Oct 5, 2025

(Updated: 7 hours ago)

workflows
ComfyUI workflow updater (update values of nodes from old workflow)

*Updated to version 2

v2 (2025-10)

- Background thread computation for significantly faster processing speed

- Update display only per file change to avoid performance slowdown

- Remember last file selection location

- Remember user selections

- Other fixes and improvements

Surprisingly this does not exist already, or I'm just suck at searching.

This tool allows you to update the values of selected nodes of a workflow from another workflow, assuming the workflow is originate the same(exactly same or have minor differences).

The why:

If you use ComfyUI workflow save files or exported png with metadata as image/prompts/loras/parameters combination saving method, you might encounter that when you adjust the workflow a bit, or you find a good set of parameters for some specific nodes, it is a chore to change these to apply on other saved workflows. You either have to open the old workflow and manually change the modified parts, or save a copy of the new workflow and modify the image/prompts/loras/parameters manually. This is where this tool will help you.

You mainly load a workflow as "workflow structure provider", select nodes that value need to be updated (or simply just select all), and you can load another workflow (or folder, all workflows inside will be processed), then the program will compare the nodes (based on id+title+type, or id+type or title+type, in case of renaming or id changed) and update the values of the nodes, and output as a new file.

Support workflow in .json or .png with metadata, output as well. Support file drag and drop.

This gadget and the instruction document is created mostly by Claude Sonnet 4.5.

UI is in English and Traditional Chinese.

Feel free to change anything whatever you want.

It works in my computer (ComfyUI version 0.3.60, front end 1.27.3), but I cannot guarantee it will work on yours and further update might break it. It only updates the widget_values in node, so might not work in all custom nodes.

I'm just lazy and will copy the document in below:

# ComfyUI Workflow Updater Tool v1

## Introduction

The ComfyUI Workflow Updater Tool is a graphical interface application designed for batch updating node parameter values in ComfyUI workflow files. It allows you to copy specific node parameter values from one workflow (value provider) and apply them to another workflow (structure provider), updating values while maintaining the complete structure.


## Core Principles


### Workflow


1. Reference Workflow (Structure Provider): Provides the complete structure of the target workflow (nodes, connections, configuration)

2. Data Source Workflow (Value Provider): Provides the node parameter values to be copied

3. Smart Node Matching: Uses a three-tier strategy to match nodes

4. Value Copying: Copies widgets_values from source nodes to target nodes

5. Output: Generates updated workflow files


### Smart Matching System


The tool employs a three-tier matching strategy, attempting in order:


1. ID + Title + Type Triple Match (Most Strict)

   - Ensures nodes are completely identical to prevent mismatches

   

2. ID + Type Match (Moderately Strict)

   - Handles cases where nodes have been renamed

   

3. Title + Type Match (Most Lenient)

   - Handles cases where IDs have changed

   - Only matches if the same-name, same-type node is unique


### Supported File Formats


- JSON: Standard format for ComfyUI workflows

- PNG: Images with embedded workflow metadata

  - Automatically reads workflow or prompt metadata

  - Writes to both fields on output to ensure compatibility


## Installation


### System Requirements


- Python 3.8 or higher

- Windows / macOS / Linux


### Installation Steps


1. Download Program Files

   # Extract workflow_updater and place the subfolder in your desired directory

   # (including workflow_updater_v1.py, readme_en.md, requirements.txt, etc.)


2. Install Dependencies

   

   1. Enter Python Environment

   

   Using ComfyUI with installed Python version as an example, assuming the installation folder is D:\ComfyUI (the folder containing main.py), and the workflow_updater folder is placed in D:\ComfyUI\workflow_updater

   

   In Windows PowerShell interface, start with administrator privileges and enter the following commands (press Enter after each line): (You need the second line If not previously set, PowerShell will block .ps1 execution)

   cd D:\ComfyUI

   Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

   .\venv\scripts\activate.ps1

   

   2. Change path to workflow_updater subfolder

   cd D:\ComfyUI\workflow_updater


   3. Install packages listed in requirements.txt

   pip install -r requirements.txt


3. Run the Program


   1. You can start the Python environment using steps 1 and 2 above, then run directly by calling Python:

   python workflow_updater_v1.py


   2. Or use the provided workflow_updater_Start.bat file to start

   

   Edit the .bat file and change the paths inside to your actual configuration paths.

   

   If you want to create a Windows taskbar shortcut, you can create a shortcut to the .bat file, then change the target to (after quotes is the actual file location):

   C:\Windows\System32\cmd.exe /c "D:\ComfyUI\Workflow_Updater\ComfyUI_Start.bat"


## Usage


### Step One: Define Update Nodes (Optional)


If you want to selectively update specific nodes, you need to create a config file first:


1. Click the "1. Define Update Nodes" tab

2. Click "Select Reference Workflow" to load a workflow

3. Check the nodes you want to update

4. Click "Save Config File" and save as config.json


Note: If you choose "All Nodes Mode", you can skip this step.


### Step Two: Execute Update


1. Click the "2. Execute Update" tab


2. Load Configuration

   - Use Config File: Load the config.json created in step one

   - All Nodes (No Config): Automatically update all nodes in the reference workflow


3. Select Reference Workflow (Structure Provider)

   - Click button or drag and drop file directly

   - This is the workflow that provides the target structure


4. Select Data Source (Value Provider)

   - Batch Process Folder: Select a folder containing multiple workflows

   - Single File: Select a single workflow file

   - Drag and drop supported


5. Configure Output

   - Output Location

     - Custom Folder: Specify output location

     - Same as Source: Output to the same directory as source files

   - Output Filename Suffix: Default is _updated

   - Output Format

     - JSON: Always output JSON

     - PNG Preferred: Output PNG if either structure provider or value provider is PNG (value provider takes priority), otherwise still output JSON


6. Start Update Execution

   - Click button to start processing

   - View execution log to understand processing results


### Preventing File Overwrite


If the output filename already exists, the program will automatically add a number:

- workflow_updated.json

- workflow_updated (1).json

- workflow_updated (2).json

- ...


## Language Switching


1. Click the top menu "Language / 語言"

2. Select "繁體中文" or "English"

3. Restart the program to apply changes


## Common Use Cases


### Scenario 1: Batch Update Prompts


You have a carefully designed workflow structure and want to apply different prompts:


1. Prepare multiple workflows containing different prompts (value providers)

2. Use your standard workflow as reference (structure provider)

3. Select "All Nodes Mode"

4. Batch process to generate multiple variants


### Scenario 2: Update Specific Parameters


You want to update specific node parameters (like resolution, steps) while keeping other settings:


1. In "Define Update Nodes", only check the nodes you want to update

2. Save the config file

3. Execute update using "Use Config File" mode


### Scenario 3: Workflow Structure Migration


Your workflow structure has changed (like adding new nodes), but you want to keep old parameters:


1. Use the new structure as reference workflow

2. Use old workflow as data source

3. The smart matching system will match identical nodes as much as possible

4. Unmatched nodes retain the reference workflow's default values


## Technical Details


### Matching Mechanism


- Priority matching by node's id + title + type

- If matching fails, match by id + type (assuming the node's title was changed)

- If still failing, match by title + type (if not unique, no match; if workflow has been adjusted, existing node IDs may change)


### Copied Data Fields


- widgets_values: Primary parameter values of the node

- Does not copy connection information inputs.link, outputs.links)

- Does not copy system properties cnr_id, ver, etc.)


### File Processing


- JSON: Direct read/write workflow objects

- PNG:

  - Read: Priority workflow metadata, then prompt

  - Write: Write to both workflow and prompt simultaneously

  - Maintains original image size and quality


### Configuration File


The program creates workflow_updater_config.json in the execution directory, storing:

- Last used reference workflow path

- Last used output folder path

- Language settings


## Troubleshooting


### Nodes Cannot Match


Cause: Node ID, title, or type mismatch


Solution:

- Check execution log to view matching failure reason

- Confirm that identical nodes actually exist in both workflows

- If node ID has changed, ensure title and type are identical and unique


### PNG Files Cannot Be Read


Cause: PNG does not contain workflow metadata


Solution:

- Confirm PNG was output from ComfyUI

- Use an image viewer that supports metadata to confirm if workflow information is included

- If PNG doesn't contain metadata, use JSON format instead


### Drag and Drop Functionality Not Working


Cause: tkinterdnd2 not installed


Solution:

```bash

pip install tkinterdnd2

```


## License and Contribution


This tool is an open-source project. Feel free to use, modify, and share.


## Version History


v1 (2025-10)

- Added smart three-tier node matching system

- Support for Chinese/English interface switching

- Added file overwrite prevention

- Support for drag and drop operations

- Optimized PNG processing (maintains original size)

- Added "Same as Source" output option


## Contact Information

Please report any issues or suggestions.

2

Comments