diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index d83dd41b1..07611ed14 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -161,6 +161,7 @@ jobs: - run: nvidia-smi - run: nvidia-smi -L + - run: docker exec ${{ env.CONTAINER_NAME }} python3 -m oneflow --doctor - run: docker exec ${{ env.CONTAINER_NAME }} python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - name: Pip Install Requirements for ComfyUI & Test if: matrix.test-suite == 'comfy' @@ -173,16 +174,27 @@ jobs: - name: Start ComfyUI Web Service if: matrix.test-suite == 'comfy' run: | - docker exec -d ${{ env.CONTAINER_NAME }} python3 /app/ComfyUI/main.py + docker exec -w /app/ComfyUI -d ${{ env.CONTAINER_NAME }} sh -c "python3 /app/ComfyUI/main.py --port 8188 > /app/ComfyUI/onediff_comfyui.log 2>&1" sleep 30 # print to check if comfy is launched successfully - run: docker exec ${{ env.CONTAINER_NAME }} ps aux - name: Test ComfyUI if: matrix.test-suite == 'comfy' run: | - docker exec -w /src/onediff/tests/comfyui ${{ env.CONTAINER_NAME }} python3 test_by_ui.py --comfy_port 8188 --workflow workflows/sdxl-unet-speedup-graph-saver.json - docker exec -w /src/onediff/tests/comfyui ${{ env.CONTAINER_NAME }} python3 test_by_ui.py --comfy_port 8188 --workflow workflows/sdxl-control-lora-speedup.json --timeout 300 + run_comfy_test() { + local workflow_name="$1" + docker exec -w /src/onediff/tests/comfyui ${{ env.CONTAINER_NAME }} python3 test_by_ui.py --comfy_port 8188 --workflow "$workflow_name" || { + docker exec ${{ env.CONTAINER_NAME }} cat /app/ComfyUI/onediff_comfyui.log + false + } + } + run_comfy_test "workflows/sdxl-unet-speedup-graph-saver.json" + run_comfy_test "workflows/sdxl-control-lora-speedup.json" + - name: Show ComfyUI Log + if: matrix.test-suite == 'comfy' + run: | + docker exec ${{ env.CONTAINER_NAME }} cat /app/ComfyUI/onediff_comfyui.log - if: matrix.test-suite == 'diffusers_examples' run: docker exec ${{ env.CONTAINER_NAME }} python3 examples/text_to_image.py --model_id=/share_nfs/hf_models/stable-diffusion-v1-5 - if: matrix.test-suite == 'diffusers_examples'