forked from xdit-project/xDiT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the CI/CD feature based on GitHub Actions (xdit-project#270)
- Loading branch information
1 parent
a77bd7d
commit cb22e05
Showing
2 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: GitHub Actions Demo | ||
run-name: Pushed by ${{ github.actor }} 🚀 | ||
on: [push] | ||
jobs: | ||
test-xfuser: | ||
name: Test xfuser | ||
runs-on: [self-hosted, linux, x64] | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 5 | ||
matrix: | ||
python-versions: [3.11] | ||
torch-versions: [2.4.1] | ||
include: | ||
- python-versions: 3.11 | ||
python-versions-full: 3_11 | ||
- torch-versions: 2.4.1 | ||
torch-versions-full: 2_4_1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup docker | ||
run: docker run --rm --name xfuser_test_docker -d -i -t --runtime=nvidia --gpus all -v /data/models/:/cfs/dit/ -v /home/github/actions-runner/_work/xDiT/xDiT:/code xfuser_cicd/test-py_${{matrix.python-versions-full}}-torch_${{matrix.torch-versions-full}} /bin/bash | ||
- name: Install xfuser | ||
run: docker exec -w /code xfuser_test_docker pip${{matrix.python-versions}} install -e . | ||
- name: Test xfuser | ||
run: docker exec -w /code xfuser_test_docker sh -c "torchrun --nproc_per_node=4 ./examples/sd3_example.py --model /cfs/dit/stable-diffusion-3-medium-diffusers --pipefusion_parallel_degree 2 --ulysses_degree 2 --ring_degree 1 --height 1024 --width 1024 --no_use_resolution_binning --num_inference_steps 20 --warmup_steps 0 --prompt 'A small dog'" | ||
- name: Destroy docker | ||
run: docker stop xfuser_test_docker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,4 @@ $PARALLLEL_VAE \ | |
$COMPILE_FLAG | ||
|
||
done | ||
done | ||
|
||
|
||
done |