Performance of Community Edition
Updated on January 23, 2024. Device: RTX 3090
Figure Notes
- Workflow Download Links
- SDXL 1.0 (Base)
- SDXL 1.0 (OneDiff)
- LoRA (Base)
- LoRA (OneDiff)
- ControlNet (Base)
- ControlNet (OneDiff)
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
-
Install Comfy CLI:
pip install comfy-cli
-
Install ComfyUI:
comfy install
-
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:
-
Clone OneDiff Repository:
git clone https://github.com/siliconflow/onediff.git
-
Install OneDiff:
cd onediff && pip install -e .
-
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/
- Symbolic Link (Recommended):
-
Install a Compiler Backend
For instructions on installing a compiler backend for OneDiff, please refer to the OneDiff GitHub repository here.
Note All the images in this section can be loaded directly into ComfyUI. You can load them in ComfyUI to get the full workflow.
"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.
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
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.
- Accelerate SD3 with onediff
- First Switch Lora
- Accelerate cubiq/PuLID_ComfyUI
- Accelerate cubiq/ComfyUI_IPAdapter_plus
- Accelerate cubiq/ComfyUI_InstantID
- Accelerate ControlNet
- SVD
- DeepCache
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.