https://github.com/oneflow-inc/diffusers
https://github.com/oneflow-inc/diffusers
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/oneflow-inc/diffusers
- Owner: Oneflow-Inc
- Created: 2024-02-20T10:10:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T01:39:40.000Z (over 2 years ago)
- Last Synced: 2025-09-06T09:38:23.698Z (9 months ago)
- Language: Python
- Homepage:
- Size: 102 KB
- Stars: 31
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OneFlow diffusers
OneFlow backend support for diffusers
## Getting started
Please refer to this [wiki](https://github.com/Oneflow-Inc/diffusers/wiki/How-to-Run-OneFlow-Stable-Diffusion)
## Quick demo
```
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
```
## More about OneFlow
OneFlow's main [repo](https://github.com/Oneflow-Inc/oneflow)
## 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" "transformers==4.27.1" "diffusers[torch]==0.15.1"
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
```
2. install transformers and diffusers
```
python3 -m pip install "torch" "transformers==4.27.1" "diffusers[torch]==0.15.1"
python3 -m pip uninstall accelerate -y
```
3. 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](/examples/)
## Release
- run examples to check it works
```bash
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
```bash
twine upload dist/*
```