Sync WD14 Models #57
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: Sync WD14 Models | |
on: | |
# push: | |
workflow_dispatch: | |
inputs: | |
models: | |
description: 'Models To Make' | |
type: str | |
default: '' | |
tag_lazy_mode: | |
description: 'Enable Tag Lazy Mode' | |
type: boolean | |
default: false | |
schedule: | |
- cron: '30 18 * * 0' | |
jobs: | |
sync: | |
name: Sync Waifu2x ONNX | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'ubuntu-latest' | |
python-version: | |
- '3.8' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 20 | |
- name: Set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up python dependences | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade flake8 setuptools wheel twine | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f requirements-build.txt ]; then pip install -r requirements-build.txt; fi | |
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi | |
if [ -f requirements-test.txt ]; then pip install -r requirements-zoo.txt; fi | |
pip install --upgrade build | |
- name: Enable Tag Lazy Mode | |
if: ${{ (github.event.inputs.tag_lazy_mode || 'false') == 'true' }} | |
shell: bash | |
run: | | |
echo 'TAG_LAZY_MODE=1' >> $GITHUB_ENV | |
- name: Disable Tag Lazy Mode | |
if: ${{ (github.event.inputs.tag_lazy_mode || 'false') == 'false' }} | |
shell: bash | |
run: | | |
echo 'TAG_LAZY_MODE=' >> $GITHUB_ENV | |
- name: Sync Models | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
MODELS: ${{ github.event.inputs.models || '' }} | |
run: | | |
python -m zoo.wd14.sync |