OneFlow backend support for diffusers
Please refer to this wiki
python3 -m pip install "torch" "transformers==4.27.1" "diffusers[torch]==0.15.1"
python3 -m pip uninstall accelerate -y
python3 -m pip install -U onediff
python3 -m onediff.demo
OneFlow's main repo
git clone https://github.com/Oneflow-Inc/diffusers.git onediff
cd onediff
python3 -m pip install "torch" "transformers==4.27.1" "diffusers[torch]==0.15.1"
python3 -m pip uninstall accelerate -y
python3 -m pip install -e .
- uninstall transformers and diffusers
python3 -m pip uninstall transformers -y
python3 -m pip uninstall diffusers -y
- install transformers and diffusers
python3 -m pip install "torch" "transformers==4.27.1" "diffusers[torch]==0.15.1"
python3 -m pip uninstall accelerate -y
- delete the main first:
git branch -D main
git fetch
git checkout main
python3 -m pip install -e .
There is a directory for examples
-
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/*