Skip to content

YanWenKun/ComfyUI-Windows-Portable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 中文说明

Portable package for ComfyUI on Windows

Screenshot

Similar to the ComfyUI official standalone portable, but preloaded with numerous custom nodes and Python packages, with all dependencies resolved.

Features

  • Pre-installed with 40+ commonly-used custom nodes. [Full List]

    • With all the model files that need to be downloaded on the first run (which may cause freezing for users with a poor Internet connection).

  • Includes 200+ mutually compatible Python packages, including:

    • insightface, dlib, etc., which require compilation during installation.

    • xFormers, which is not included in the ComfyUI official package for an understandable reason. It may not be significant for text-to-image, but could be useful for video workflows.

  • Only a few functional models are pre-installed; users please prepare SD models of your favorite.

  • This repo uses the GitHub pipeline for packaging, making it easy for DIY. No need to configure CI/CD, simply fork the repository on GitHub to run the packaging script. See Creating Your Own All-In-One Package.

How to Use

  1. Only NVIDIA GPUs are supported, preferably with the latest driver installed.

  2. Download the package files from the release page.

  3. Place SD models in ComfyUI\models\checkpoints.

    • Subdirectories can be created for better organization.

  4. Run RUN_Launcher.bat to start.

Launcher Screenshot
  • After launching, the program will automatically open a browser. You can also manually access: http://localhost:8188/.

  • Close the window to exit the program.

Tips and Tricks

  1. The ExtraScripts folder contains command-line launch scripts, which are equivalent to the launcher.

  2. Take full advantage of ComfyUI-Manager (the Manager button in the top-right corner of the ComfyUI page) to manage custom nodes: install, update, disable, and uninstall.

    • Be cautious when using "Update All"; there’s no need to update unused nodes to avoid Python package conflicts.

  3. For power users, consider using Sandboxie to limit cache files while isolating the environment.

    • For better I/O performance when using Sandboxie, it is recommended to configure the program’s main directory (ComfyUI_Windows_portable) as "Open Access" in "Sandbox Options" → "Resource Access".

4. External Model Directory

If you place model files on different partitions or share a set of model files across multiple ComfyUI instances, you can configure ComfyUI to load external model directories:

  • Rename extra_model_paths.yaml.example in the ComfyUI directory, removing the .example suffix.

  • Edit extra_model_paths.yaml, where lines starting with # are comments.

Reference file (click to expand)
comfyui:
    base_path: D:\models\
    animatediff_models: animatediff_models
    animatediff_motion_lora: animatediff_motion_lora
    bert-base-uncased: bert-base-uncased
    checkpoints: checkpoints
    clip: clip
    clip_vision: clip_vision
    configs: configs
    controlnet: controlnet
    depthfm: depthfm
    diffusers: diffusers
    diffusion_models: |
        diffusion_models
        unet
    embeddings: embeddings
    facerestore_models: facerestore_models
    gligen: gligen
    grounding-dino: grounding-dino
    hypernetworks: hypernetworks
    insightface: insightface
    instantid: instantid
    ipadapter: ipadapter
    loras: loras
    mmdets: mmdets
    onnx: onnx
    photomaker: photomaker
    reactor: reactor
    rembg: rembg
    sams: sams
    style_models: style_models
    text_encoders: text_encoders
    ultralytics: ultralytics
    unet: unet
    upscale_models: upscale_models
    vae: vae
    vae_approx: vae_approx

5. More External Model Directories

ComfyUI has five common locations for saving model files:

  • The built-in ComfyUI\models directory.

  • External model directories configured via extra_model_paths.yaml.

  • Model files downloaded via HuggingFace Hub (HF official downloader).

  • Model files downloaded via PyTorch.

  • Files downloaded in-place by nodes in ComfyUI\custom_nodes.

Among these:

  • HF Hub defaults to downloading files to C:\Users\UserName\.cache\huggingface\hub.

  • PyTorch defaults to downloading files to C:\Users\UserName\.cache\torch\hub.

This package modifies the launch script to redirect these to the program’s root directory, under HuggingFaceHub and TorchHome folders, respectively, for easier management. If needed, you can edit the launch script to change these paths.

6. How to Perform a "Refresh" Major Update

This method does not use ComfyUI-Manager for updates but directly replaces the package with a new version. If the process goes smoothly, it avoids installing or upgrading Python packages, thus preventing dependency conflicts.

  1. Extract the new package.

  2. Delete the ComfyUI, HuggingFaceHub, and TorchHome folders in the new package.

  3. Copy (or move) these three folders from the old package to the new one.

  4. Run RUN_Force_Updater.bat in the new package’s root directory.

  5. If any nodes fail to load, use ComfyUI-Manager to "try fix."

Details

Pre-installed Custom Node List

Table 1. Workspace

ComfyUI Manager

Crystools

ComfyUI-to-Python-Extension

Table 2. General

AKatz Nodes

Comfyroll Studio

ComfyUI Essentials by cubiq

Derfuu Modded Nodes

Custom Scripts by pythongosssss

Efficiency Nodes by jags111

Jovimetrix

KJNodes

Mikey Nodes

Mira Nodes

rgthree Nodes

smZ(shiimizu) Nodes

Use Everywhere

WAS Node Suite

ComfyUI-Easy-Use

Table 3. Control

Advanced ControlNet

ControlNet Auxiliary Preprocessors

Detail Daemon

IC-Light Native

Impact Pack

Impact Subpack

Inspire Pack

InstantID by cubiq

IPAdapter plus

Layer Style

PuLID by cubiq

LayerDiffuse

Portrait Master

ReActor Node

SD Dynamic Thresholding

SDXL Prompt Styler

Table 4. Video

AnimateDiff Evolved

FizzNodes

Frame Interpolation (VFI)

MTB Nodes

Video Helper Suite

Table 5. More

ComfyUI-GGUF

Depth Anything V2 by kijai

DepthCrafter by akatz

Face Analysis by cubiq

Florence-2 by kijai

Image Selector

ProPost

Segment Anything 2 by neverbiasu

Ultimate SD Upscale

WD 1.4 Tagger

Janus-Pro

If compatibility issues arise, you can try disabling conflicting nodes in ComfyUI-Manager.

Creating Your Own All-In-One Package

GitHub Workflow Status

This repository utilizes a pipeline to build the package, and the codebase doesn’t contain specific configurations or require additional access permissions. Hence, you can directly fork this repository to start executing the GitHub Workflow.

  1. After forking, go to Actions on the page.

  2. Locate Build & Upload Package.

    • For example, the page in my repository looks like this.

  3. Click Run Workflow.

  4. Wait about 20~40 minutes until the workflow run complete.

  5. Go to the releases page of your repository, where you will find the newly generated draft, ready for download or editing.

Development Idea

Originally, the code was copied from ComfyUI’s GitHub workflow, but I found it difficult to debug, so I rewrote the script.

However, the packaging concept is similar: providing a self-contained, portable, and fully equipped environment with a pre-installed Python Embedded.

The difference is that I didn’t download wheels first and then install them in bulk like Comfy did. Because dependency relationships are too tricky, I went straight to pip install for dependency solving.

As a note, a common issue with Python Embedded in such pre-installed packages is that most of the executables in the Scripts directory cannot run properly. This is because these executables are often Python command wrappers that invoke python.exe through an absolute path. Once the directory changes (or is relocated), they naturally fail to execute. Fortunately, this does not affect the current project significantly.

Thanks

Thanks to the ComfyUI GitHub workflow, from which I drew inspiration.

About

🎨ComfyUI standalone pack with 40+ custom nodes. | ComfyUI 大号整合包,预装大量自定义节点(不含SD模型)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published