Skip to content

Latest commit

 

History

History
168 lines (109 loc) · 5.39 KB

README.md

File metadata and controls

168 lines (109 loc) · 5.39 KB

OneDiff ComfyUI Nodes


Performance of Community Edition

Updated on January 23, 2024. Device: RTX 3090

SDXL End2End Time , Image Size 1024x1024 , Batch Size 1 , steps 20

Figure Notes

Documentation

Installation Guide

This guide provides two methods to install ComfyUI and integrate it with the OneDiff library: via the Comfy CLI or directly from GitHub.

Option 1: Installing via Comfy CLI
  1. Install Comfy CLI:

    pip install comfy-cli
  2. Install ComfyUI:

    comfy install
  3. Install OneDiff Comfy Nodes:

    comfy node install onediff_comfy_nodes

    By default, this installs the oneflow backend. You can add other backends if needed; please refer to the OneDiff GitHub repository here.

Option 2: Installing via GitHub

First, install and set up ComfyUI, and then follow these steps:

  1. Clone OneDiff Repository:

    git clone https://github.com/siliconflow/onediff.git
  2. Install OneDiff:

    cd onediff && pip install -e .
  3. Integrate OneDiff Comfy Nodes with ComfyUI:

    • Symbolic Link (Recommended):
      ln -s $(pwd)/onediff_comfy_nodes path/to/ComfyUI/custom_nodes/
    • Copy Directory:
      cp -r onediff_comfy_nodes path/to/ComfyUI/custom_nodes/
  4. Install a Compiler Backend

    For instructions on installing a compiler backend for OneDiff, please refer to the OneDiff GitHub repository here.

Basic Node Usage

Note All the images in this section can be loaded directly into ComfyUI. You can load them in ComfyUI to get the full workflow.

Model Speedup

Load Checkpoint - OneDiff

"Load Checkpoint - OneDiff" is the optimized version of "LoadCheckpoint", designed to accelerate the inference speed without any awareness required. It maintains the same input and output as the original node.

The "Load Checkpoint - OneDiff" node set vae_speedup : enable to enable VAE acceleration.

Compiler Cache

Avoid compilation time for online serving

# Set custom directory for saving graphs in ComfyUI with OneFlow backend
export COMFYUI_ONEDIFF_SAVE_GRAPH_DIR="/path/to/save/graphs"

# Enable graph cache to avoid recompiling
export NEXFORT_GRAPH_CACHE=1

# Specify persistent cache directory for Torchinductor
export TORCHINDUCTOR_CACHE_DIR=~/.torchinductor_cache

Quantization

Note: Quantization feature is only supported by OneDiff Enterprise.

OneDiff Enterprise offers a quantization method that reduces memory usage, increases speed, and maintains quality without any loss.

If you possess a OneDiff Enterprise license key, you can access instructions on OneDiff quantization and related models by visiting Online Quantization for ComfyUI. Alternatively, you can contact us to inquire about purchasing the OneDiff Enterprise license.

Tutorials

Contact

For users of OneDiff Community, please visit GitHub Issues for bug reports and feature requests.

For users of OneDiff Enterprise, you can contact [email protected] for commercial support.

Feel free to join our Discord community for discussions and to receive the latest updates.