OneFlow backend support for diffusers
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:20231106OneDiff Pro delivers even higher performance and second-to-none deployment flexibility.
If you need LoRA, ComfyUI or quant support or any other more advanced features, please send an email to caishenghang@oneflow.org 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 |
Please refer to this wiki
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/cu121CUDA 12.2
python3 -m pip install --pre oneflow -f https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/master_open_source/cu122python3 -m pip install huggingface_hub
~/.local/bin/huggingface-cli login
python3 examples/text_to_image.py
-
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/*
OneFlow's main repo