Create pytorch_installation.yml #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check diffusers | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pytorch-installation-diffusers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U torch --index-url https://download.pytorch.org/whl/cpu | |
pip install transformers | |
- name: Test installing diffusers and importing | |
run: | | |
pip install diffusers && pip uninstall diffusers -y | |
pip install -i https://testpypi.python.org/pypi diffusers | |
python -c "from diffusers import __version__; print(__version__)" | |
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('fusing/unet-ldm-dummy-update'); pipe()" | |
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('hf-internal-testing/tiny-stable-diffusion-pipe', safety_checker=None); pipe('ah suh du')" | |
python -c "from diffusers import *" | |
echo "Done 🔥" |