Skip to content

siliconflow/onediff_comfy_nodes

Repository files navigation

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

Please install and set up ComfyUI first, and then:

Setup Community Edition

Setup Community Edition
  1. Install OneFlow Community
  • Install OneFlow Community(CUDA 11.x)

    pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu118
  • Install OneFlow Community(CUDA 12.x)

    pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu121
  1. Install OneDiff

    git clone https://github.com/siliconflow/onediff.git
    cd onediff && pip install -e .
  2. Install onediff_comfy_nodes for ComfyUI

    cd onediff
    cp -r onediff_comfy_nodes path/to/ComfyUI/custom_nodes/

Setup Enterprise Edition

  1. Install OneDiff Enterprise

  2. Install onediff_comfy_nodes for ComfyUI

    git clone https://github.com/siliconflow/onediff.git
    cd onediff 
    cp -r onediff_comfy_nodes path/to/ComfyUI/custom_nodes/

Basical Nodes 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.

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.

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 Hugginface/siliconflow. Alternatively, you can contact us to inquire about purchasing the OneDiff Enterprise license.

OneDiff Community Examples

LoRA

This example demonstrates how to utilize LoRAs. You have the flexibility to modify the LoRA models or adjust their strength without the need for recompilation.

Lora Speedup

ControlNet

doc link: ControlNet

While there is an example demonstrating OpenPose ControlNet, it's important to note that OneDiff seamlessly supports a wide range of ControlNet types, including depth mapping, canny, and more.

ControlNet Speedup

SVD

doc link: SVD

This example illustrates how OneDiff can be used to enhance the performance of a video model, specifically in the context of text-to-video generation using SVD. Furthermore, it is compatible with SVD 1.1.

SVD Speedup

DeepCache

DeepCache is an innovative algorithm that substantially boosts the speed of diffusion models, achieving an approximate 2x improvement. When used in conjunction with OneDiff, it further accelerates the diffusion model to approximately 3x.

Here are the example of applying DeepCache to SD and SVD models.

Module DeepCache SpeedUp on SD

Module DeepCache SpeedUp on SVD

Module DeepCache SpeedUp on LoRA

InstantID

doc link

Contact

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

For users of OneDiff Enterprise, you can contact contact@siliconflow.com for commercial support.

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