--- title: "How to Update ComfyUI" description: "This section provides a comprehensive guide to updating ComfyUI" icon: "circle-up" sidebarTitle: "Update ComfyUI" --- import InstallLink from "/snippets/install/install-link.mdx" import UpdateRequirement from "/snippets/install/update-requirement.mdx" While we've covered ComfyUI updates across different installation methods in various sections, this comprehensive guide consolidates all update procedures to help users clearly understand how to update ComfyUI. ## How to Update ComfyUI? ComfyUI Portable provides convenient batch scripts for easy updates. ### Update Script Location In the `update` folder within your portable installation directory, you'll find the following update scripts: ``` ComfyUI_windows_portable └─ πŸ“‚update β”œβ”€β”€ update.py β”œβ”€β”€ update_comfyui.bat // Update to latest development version β”œβ”€β”€ update_comfyui_stable.bat // Update to latest stable version └── update_comfyui_and_python_dependencies.bat // ⚠️ DANGER: Reinstalls dependencies - may cause conflicts ``` Ensure a stable internet connection during updates. **⚠️ DANGER: Use `update_comfyui_and_python_dependencies.bat` with extreme caution!** This script is more thorough than regular updates and will: - βœ… Update ComfyUI code itself - βœ… Update PyTorch (for NVIDIA GPU CUDA 12.9) - βœ… Reinstall ALL Python dependencies **Risks:** - May cause dependency conflicts with your existing setup - Can break custom nodes that rely on specific package versions - May overwrite manually configured packages **⚠️ Only use this script when:** - You need to fix dependency issues - Performing major version updates - For daily updates, use `update_comfyui.bat` instead **Before running this script:** 1. **Back up your entire ComfyUI installation** 2. Document any custom package versions you've installed 3. Be prepared to reinstall custom nodes if needed Comfy Desktop features automatic updates to ensure you're always running the latest version. However, since the Desktop version is built on stable releases, feature updates may lag behind. You can also visit the [download page](https://www.comfy.org/download) to get the latest version. ### Auto-Update Settings Ensure automatic updates are enabled in your settings: ![Comfy Desktop Settings](/images/desktop/comfyui-desktop-update-setting.jpg) ### Manual Update Check You can also manually check for available updates: 1. Click `Menu` in the menu bar 2. Select `Help` 3. Click `Check for Updates` ![Comfy Desktop Check Updates](/images/desktop/desktop_check_for_updates.jpg) Desktop version automatically handles all update processes, including ComfyUI core code and dependency updates Manually installed ComfyUI requires Git commands to complete updates. ### Pre-Update Requirements Ensure your system has [Git](https://git-scm.com/downloads) installed and ComfyUI was installed via Git clone. ### Update Steps First, activate ComfyUI's Python virtual environment (if using one): ```bash # For conda environment conda activate comfyui # For venv environment # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate ``` Navigate to your ComfyUI installation directory and pull the latest code: ```bash cd git pull ``` Install or update ComfyUI's dependency packages: ```bash pip install -r requirements.txt ``` Ensure you're in ComfyUI's virtual environment to avoid contaminating the system-level Python environment After updating, restart ComfyUI: ```bash python main.py ``` ### Version Switching (Optional) To switch to a specific version, use these commands: ```bash # View commit history git log --oneline # Switch to specific commit git checkout # Return to latest version git checkout master ``` Regular updates are recommended for the latest features and security fixes, while stable versions are recommended for system stability ## ComfyUI Version Types Depending on your installation method, ComfyUI offers several installation versions. The links below contain update instructions for each version. ## What Needs to Be Updated When Updating ComfyUI? ComfyUI updates primarily consist of two components: 1. Update ComfyUI's core code 2. Update ComfyUI's core dependencies, including necessary Python dependencies and ComfyUI functional dependency packages **Core Code**: New nodes, new model support, new features, etc. **Core Dependencies**: Mainly includes ComfyUI's frontend functionality, workflow templates, node help documentation, etc. ``` comfyui-frontend-package # ComfyUI frontend functionality comfyui-workflow-templates # ComfyUI workflow templates comfyui-embedded-docs # ComfyUI node help documentation comfy-kitchen # ComfyUI core utilities comfy-aimdo # ComfyUI core utilities ``` These core dependencies are maintained in separate repositories: - [ComfyUI_frontend](https://github.com/Comfy-Org/ComfyUI_frontend/) - Frontend interface and interactive features - [workflow_templates](https://github.com/Comfy-Org/workflow_templates) - Pre-built workflow templates - [comfyui-embedded-docs](https://github.com/Comfy-Org/embedded-docs) - Node help documentation - [comfy-kitchen](https://github.com/Comfy-Org/comfy-kitchen) - Fast kernel library for Diffusion inference with multiple compute backends - [comfy-aimdo](https://github.com/Comfy-Org/comfy-aimdo) - AI Model Demand Offloading Allocator It's important to understand the difference between development (nightly) and stable (release) versions: - **Development version (nightly)**: Latest commit code, giving you access to the newest features, but may contain potential issues - **Stable version (release)**: Built on stable releases, usually lags behind development versions but offers higher stability. We support stable versions after features are tested and stabilized Many users often find themselves on release versions or desktop versions during updates, but discover that needed features are only available in development versions. In such cases, check if your local `ComfyUI/requirements.txt` matches the [nightly version dependencies](https://github.com/Comfy-Org/ComfyUI/blob/master/requirements.txt) to determine if all dependencies support the latest features. ## Common Update Issues ### Missing or Outdated Frontend, Workflow Templates, Node After Updates Users often only use the `git pull` command to update ComfyUI code but **neglect core dependency updates**, leading to the following issues: - Missing or abnormal frontend functionality - Cannot find newly added workflow templates - Outdated or missing node help documentation - New features lack corresponding frontend support After using the `git pull` command, use the corresponding ComfyUI environment to use `pip install -r requirements.txt` to update dependencies. If dependency updates fail, it's commonly due to network or computer permission issues. When core dependency failures occur during updates, the system falls back to older versions. You'll typically see logs like this during startup: ``` Falling back to the default frontend. ComfyUI frontend version: xxx ``` Follow these troubleshooting steps: 1. Use `pip list` in the appropriate environment to view currently installed dependency packages. If you find version inconsistencies, use `pip install -r requirements.txt` in the ComfyUI environment to attempt dependency updates again. 2. If issues persist after updating, check your network connection. Users in mainland China may need to configure a proxy to reliably access GitHub repositories. 3. If problems continue, check computer permissions. If administrator privileges are required, run the command line with administrator rights. ### How to Properly Update Core Dependencies ### Core Dependency Update Troubleshooting If core dependency updates fail, follow these troubleshooting steps: If located in mainland China, ensure you can access PyPI or configure a domestic mirror: ```bash # Using Tsinghua University mirror pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple ``` If batch installation fails, try installing packages individually. **First check version requirements in `ComfyUI/requirements.txt`**: **Then install according to specified versions (use version numbers from your requirements.txt):** ```bash pip install comfyui-frontend-package== pip install comfyui-workflow-templates== pip install comfyui-embedded-docs== pip install comfy-kitchen== pip install comfy-aimdo== ``` It's recommended to use the exact version numbers specified in `ComfyUI/requirements.txt`. Don't upgrade to the latest versions independently, as this may cause compatibility issues. ### Why Can't I Find New Features After Updating? This is one of the most common issues: - If you're using the **Desktop version**, features may lag behind because the desktop version is built on stable releases - Ensure you're using the **development version (nightly)**, not the **stable version (release)** Additionally, ensure that corresponding dependencies have been successfully updated during the update process. If issues persist after updating, refer to the [Dependency Update Troubleshooting](#dependency-update-troubleshooting) section to diagnose problems. ### How to Switch Between Development (Nightly) and Stable (Release) Versions? Differences between versions: - **Characteristics**: Contains the latest commit code - **Advantages**: Experience the latest features and improvements first - **Risks**: May contain undiscovered bugs or unstable factors - **Suitable for**: Developers, testers, users wanting to experience the latest features - **Characteristics**: Tested and verified stable code - **Advantages**: High stability, suitable for production environments - **Disadvantages**: Feature updates have delays, may lag behind development versions by weeks or months - **Suitable for**: Users requiring stability, production environment users Use `update_comfyui.bat` instead of `update_comfyui_stable.bat`: ``` # Development version (latest features) double-click: update_comfyui.bat # Stable version double-click: update_comfyui_stable.bat ``` ```bash # Switch to development version git checkout master git pull # Switch to latest stable version git fetch --tags git checkout $(git describe --tags `git rev-list --tags --max-count=1`) ``` Desktop version is typically built on stable releases and doesn't currently support version switching. If you need the latest features, we recommend: 1. Wait for desktop version updates 2. Or use portable/manual installation to experience the latest features ### What to Do When Errors Occur After Updates? 1. **Check Dependencies**: Run `pip install -r requirements.txt` to ensure all dependencies are updated 2. **Check Custom Nodes**: Some custom nodes may be incompatible with new versions 3. **Roll Back Version**: If issues are severe, you can roll back to a previous stable version If problems occur, refer to our troubleshooting page for solutions. Learn how to troubleshoot ComfyUI issues ### How to Stay Updated on New Features? - **GitHub Releases**: Check [ComfyUI Releases](https://github.com/Comfy-Org/ComfyUI/releases) for stable version updates - **GitHub Commits**: View [latest commits](https://github.com/Comfy-Org/ComfyUI/commits/master) to understand development progress - **Community Discussion**: Follow our [blog](https://blog.comfy.org) and [Twitter](https://x.com/comfyui) for the latest updates