Code Monkey home page Code Monkey logo

onediff's Introduction

PyPI version Docker image build Run examples

OneDiff

An out-of-the-box acceleration library for diffusion models (especially for ComfyUI, HF diffusers, and Stable Diffusion web UI).

Easy to use

State-of-the-art performance

Updated on Nov 6, 2023.

Device SD1.5 (512x512) SD2.1 (512x512) SDXL1.0-base(1024x1024)
RTX 3090 42.38it/s 42.33it/s 6.66it/s
RTX 4090 74.71it/s 73.57it/s 13.57it/s
A100-PCIE-40GB 54.4it/s 54.06it/s 10.22it/s
A100-SXM4-80GB 59.68it/s 61.91it/s 11.80it/s

NOTE: OneDiff Enterprise Edition delivers even higher performance and second-to-none deployment flexibility.

OS and GPU support

  • Linux
    • If you want to use OneDiff on Windows, please use it under WSL.
  • NVIDIA GPUs

Need help or talk

OneDiff Enterprise Edition

If you need Enterprise Level Support for your system or business, please send an email to [email protected] and tell us about your user case, deployment scale, and requirements.

OneDiff Enterprise Edition can be subscripted for one month and one GPU and the cost is low: https://siliconflow.com/product.html

  OneDiff Enterprise OneDiff Community
SD/SDXL series model Optimization Yes Yes
UNet/VAE/ControlNet Optimization Yes Yes
LoRA(and dynamic switching LoRA) Yes Yes
SDXL Turbo/LCM Yes Yes
Stable Video Diffusion Yes Yes
HF diffusers Yes Yes
ComfyUI Yes Yes
Stable Diffusion web UI Yes Yes
Multiple Resolutions Yes(No time cost for most of the cases) Yes(Cost a few seconds/minutes to compile for new input shape)
Technical Support for deployment High priority support Community
More Extreme and Dedicated optimization(usually another 20~50% performance gain) Yes
Support customized pipeline/workflow Yes
Get the latest technology/feature Yes

Install from source or Using in Docker

Install from source

1. Install OneFlow

NOTE: We have updated OneFlow a lot for OneDiff, so please install OneFlow by the links below.

For CUDA 11.8

python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu118
Click to get OneFlow packages for other CUDA versions. CUDA 12.1
python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu121

CUDA 12.2

python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu122

2. Install torch and diffusers

python3 -m pip install "torch" "transformers==4.27.1" "diffusers[torch]==0.19.3"

3. Install OneDiff

git clone https://github.com/siliconflow/onediff.git
cd onediff && python3 -m pip install -e .

4. (Optional)Login huggingface-cli

python3 -m pip install huggingface_hub
 ~/.local/bin/huggingface-cli login

Docker

docker pull oneflowinc/onediff:20231106

onediff's People

Contributors

jackalcooper avatar strint avatar ccssu avatar doombeaker avatar hjchen2 avatar hank0626 avatar clackhan avatar lixiang007666 avatar fpzh2011 avatar marigoold avatar flowingsun007 avatar chengzeyi avatar haoyang9804 avatar eltociear avatar daquexian avatar jackwensen avatar onaugust1 avatar levi131 avatar

Stargazers

Mahadeb Das avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.