name: Synchronize HuggingFace Repos to ModelScope on: schedule: - cron: '0 3 * * *' # Run every day at 03:00 UTC workflow_dispatch: # Allow manual trigger from GitHub UI jobs: sync: runs-on: ubuntu-latest if: github.repository == 'nunchaku-tech/nunchaku' strategy: matrix: repo: - nunchaku - nunchaku-t5 - nunchaku-flux.1-schnell - nunchaku-flux.1-dev - nunchaku-flux.1-fill-dev - nunchaku-flux.1-depth-dev - nunchaku-flux.1-canny-dev - nunchaku-shuttle-jaguar - nunchaku-sana - nunchaku-flux.1-kontext-dev steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install dependencies run: | python -m pip install --upgrade pip pip install huggingface_hub modelscope hf_xet - name: Sync HF Repo ${{ matrix.repo }} run: | cd scripts HF_TOKEN=${{ secrets.HF_TOKEN }} MODELSCOPE_TOKEN=${{ secrets.MODELSCOPE_TOKEN }} python sync_hf_to_ms.py --repo ${{ matrix.repo }}