Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests regularly #417

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ on:
- "*.md"
- "**/*.md"
- "LICENSE*"
schedule:
# every 3 hours
- cron: "0 */3 * * *"

env:
CONTAINER_NAME: onediff-test
REGION_ID: cn-beijing
ACR_ORG: registry.cn-beijing.aliyuncs.com/oneflow
COMFYUI_SRC_DIR: ComfyUI
SDXL_BASE: /share_nfs/hf_models/sd_xl_base_1.0.safetensors
UNET_INT8: /share_nfs/hf_models/unet_int8
UNET_INT8: /share_nfs/hf_models/unet_int8
CONTROL_LORA_OPENPOSEXL2_RANK256: /share_nfs/hf_models/controlnet/control-lora-openposeXL2-rank256.safetensors
SELENIUM_CONTAINER_NAME: selenium-test
SELENIUM_IMAGE: standalone-chrome:119.0-chromedriver-119.0-grid-4.15.0-20231129
Expand Down Expand Up @@ -57,12 +61,12 @@ jobs:

- run: |
docker rm -f ${{ env.CONTAINER_NAME }} || true
docker pull ${{ env.ACR_ORG }}/${{ matrix.image }}
docker pull ${{ env.ACR_ORG }}/${{ matrix.image }}
- if: matrix.test-suite == 'comfy'
run: |
docker rm -f ${{ env.SELENIUM_CONTAINER_NAME }} || true
docker pull ${{ env.ACR_ORG }}/${{ env.SELENIUM_IMAGE }}

- name: Setup docker for ComfyUI Test
if: matrix.test-suite == 'comfy'
run: |
Expand All @@ -88,7 +92,6 @@ jobs:
SDXL_BASE: ${{ env.SDXL_BASE }}
UNET_INT8: ${{ env.UNET_INT8 }}


- run: nvidia-smi
- run: nvidia-smi -L
- run: docker exec ${{ env.CONTAINER_NAME }} python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Expand All @@ -97,19 +100,19 @@ jobs:
run: |
docker exec ${{ env.CONTAINER_NAME }} python3 -m pip install -r tests/comfyui/requirements.txt --user
docker exec ${{ env.CONTAINER_NAME }} python3 -m pip install -r ComfyUI/requirements.txt --user

- name: Start ComfyUI Web Service
if: matrix.test-suite == 'comfy'
run: |
docker exec -d ${{ env.CONTAINER_NAME }} python3 /app/ComfyUI/main.py
sleep 30

- 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

- 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'
Expand Down
Loading