GithubHelp home page GithubHelp logo

kopyl / oneflow-diffusers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siliconflow/onediff

1.0 0.0 0.0 218 KB

OneFlow backend for 🤗 Diffusers and ComfyUI

Home Page: https://github.com/Oneflow-Inc/oneflow

Python 99.47% Dockerfile 0.53%

oneflow-diffusers's Introduction

PyPI version Docker image build

OneFlow diffusers

OneFlow backend support for diffusers

Performance

Updated on Nov 6, 2023.

SD1.5 (512x512) SD2.1 (512x512) SDXL1.0-base(1024x1024)
3090 42.38it/s 42.33it/s 6.66it/s
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

Run it by yourself using Docker:

docker pull oneflowinc/onediff:20231106

OneDiff Pro delivers even higher performance and second-to-none deployment flexibility.

Business inquiry

If you need LoRA, ComfyUI or quant support or any other more advanced features, please send an email to [email protected] to tell us about your use case, deployment scale and requirements!!

  OneDiff Open Source OneDiff Pro
diffusers API Yes Yes
UNet/VAE Compilation Yes Yes
LoRA Yes
ComfyUI   Yes
Quantization   Yes
Source Code Access   Yes
Multiple Resolutions Limited Yes
Technical Support Community Yes

Use within docker or install with pip

Please refer to this wiki

Install from source

Clone and install

python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/master_open_source/cu118
python3 -m pip install "torch" "transformers==4.27.1" "diffusers[torch]==0.19.3"
git clone https://github.com/Oneflow-Inc/diffusers.git onediff
cd onediff && python3 -m pip install -e .

Other optional packages

CUDA 12.1

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

CUDA 12.2

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

Login huggingface-cli

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

Run examples

python3 examples/text_to_image.py

Release

  • run examples to check it works

    python3 examples/text_to_image.py --model_id=...
    python3 examples/text_to_image_sdxl.py --base ...
    bash examples/unet_save_and_load.sh --model_id=...
  • bump version in these files:

    setup.py
    src/onediff/__init__.py
    
  • build wheel

    rm -rf dist
    python3 setup.py bdist_wheel
    
  • upload to pypi

    twine upload dist/*

More about OneFlow

OneFlow's main repo

oneflow-diffusers's People

Contributors

ccssu avatar clackhan avatar daquexian avatar doombeaker avatar flowingsun007 avatar hank0626 avatar hjchen2 avatar jackalcooper avatar jackwensen avatar kopyl avatar levi131 avatar onaugust1 avatar strint avatar

Stargazers

 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.