Unverified Commit 68488d52 authored by Muyang Li's avatar Muyang Li Committed by GitHub
Browse files

chore: update the test ci for the new comfyui tests (#750)

* chore: update the comfyui test ci

* debugging

* update

* update

* udpate"

* use conda's c++

* update

* update
parent f05237e8
...@@ -40,6 +40,7 @@ jobs: ...@@ -40,6 +40,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
submodules: true submodules: true
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
- name: Show current commit - name: Show current commit
run: git log -1 --oneline run: git log -1 --oneline
- name: Set up Python - name: Set up Python
...@@ -53,6 +54,7 @@ jobs: ...@@ -53,6 +54,7 @@ jobs:
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
echo "Installing dependencies" echo "Installing dependencies"
conda install -c conda-forge gxx=11 gcc=11 libsndfile -y
pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128 pip install torch==2.8 torchvision==0.23 --index-url https://download.pytorch.org/whl/cu128
pip install -e ".[ci]" pip install -e ".[ci]"
- name: Setup ComfyUI - name: Setup ComfyUI
...@@ -60,33 +62,38 @@ jobs: ...@@ -60,33 +62,38 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python which python
pwd
cd .. cd ..
pip install comfy-cli
rm -rf ComfyUI rm -rf ComfyUI
yes | comfy --here install --nvidia --skip-torch-or-directml --version 0.3.44 mkdir -p ComfyUI
cd ComfyUI cd ComfyUI
rm -r models mkdir -p "${COMFYUI_MODELS_ROOT}"
mkdir -p $COMFYUI_MODELS_ROOT ln -s "${COMFYUI_MODELS_ROOT}" models
ln -s $COMFYUI_MODELS_ROOT models mkdir -p custom_nodes
cd custom_nodes cd custom_nodes
git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git
pip install -r ComfyUI-nunchaku/requirements.txt
git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git
cd comfyui_controlnet_aux
git checkout cc6b232
cd ..
git clone https://github.com/CY-CHENYUE/ComfyUI-InpaintEasy.git
cd ComfyUI-InpaintEasy
pip install -r requirements.txt
git checkout d631a03
cd ..
cd .. cd ..
pip install -r custom_nodes/ComfyUI-nunchaku/requirements.txt ln -s custom_nodes/ComfyUI-nunchaku/tests tests
comfy node install comfyui_controlnet_aux pip install -r tests/requirements.txt
comfy node install comfyui-inpainteasy
cp -r custom_nodes/ComfyUI-nunchaku/tests nunchaku_tests
pip install -r nunchaku_tests/requirements.txt
python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py python custom_nodes/ComfyUI-nunchaku/scripts/download_models.py
python custom_nodes/ComfyUI-nunchaku/scripts/download_test_data.py mkdir -p input
python custom_nodes/ComfyUI-nunchaku/scripts/download_inputs.py
- name: Run ComfyUI tests - name: Run ComfyUI tests
run: | run: |
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; } conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
pwd pwd
cd ../ComfyUI cd ../ComfyUI
python nunchaku_tests/scripts/nunchaku-flux1-dev.py pytest tests/test_workflows.py -x -vv --reruns 2 --reruns-delay 0
pytest -s -x nunchaku_tests/
- name: Run nunchaku tests - name: Run nunchaku tests
run: | run: |
source $(conda info --base)/etc/profile.d/conda.sh source $(conda info --base)/etc/profile.d/conda.sh
......
...@@ -62,7 +62,7 @@ class Case: ...@@ -62,7 +62,7 @@ class Case:
@pytest.mark.parametrize( @pytest.mark.parametrize(
"case", [pytest.param(Case(expected_lpips={"int4-bf16": 0.14, "fp4-bf16": 0.12}), id="flux.1-schnell-r32")] "case", [pytest.param(Case(expected_lpips={"int4-bf16": 0.14, "fp4-bf16": 0.15}), id="flux.1-schnell-r32")]
) )
def test_flux_schnell(case: Case): def test_flux_schnell(case: Case):
batch_size = case.batch_size batch_size = case.batch_size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment