Alex3076 / diffusers

OneFlow backend for 🤗 Diffusers

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyPI version

OneFlow diffusers

OneFlow backend support for diffusers

Getting started

Please refer to this wiki

Quick demo

python3 -m pip install "torch<2" "transformers>=4.26" "diffusers[torch]==0.14.0"
python3 -m pip uninstall accelerate -y
python3 -m pip install -U onediff
python3 -m onediff.demo

More about OneFlow

OneFlow's main repo

Development

Option 1: Fresh clone and dev install

git clone https://github.com/Oneflow-Inc/diffusers.git onediff
cd onediff
python3 -m pip install "torch<2" "transformers>=4.26" "diffusers[torch]==0.14.0"
python3 -m pip uninstall accelerate -y
python3 -m pip install -e .

Option 2: Setup if you were using the the oneflow-fork branch before

  1. uninstall transformers and diffusers
python3 -m pip uninstall transformers -y
python3 -m pip uninstall diffusers -y
  1. install transformers and diffusers
python3 -m pip install "transformers>=4.26" "diffusers[torch]==0.14.0"
python3 -m pip uninstall accelerate -y
  1. delete the main first:
git branch -D main
git fetch
git checkout main
python3 -m pip install -e .

More examples

There is a directory for examples

Release

  • run examples to check it works

    python3 examples/text_to_image.py
    python3 examples/text_to_image_dpmsolver.py
  • 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/*

About

OneFlow backend for 🤗 Diffusers

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


Languages

Language:Python 100.0%