Skip to content

Commit

Permalink
add visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
mszhanyi committed Jan 28, 2024
1 parent 727ddea commit 0c3c04a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tools/ci_build/github/azure-pipelines/bigmodels-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ stages:

- script: |
docker run --rm --gpus all -v $PWD:/workspace -v $(Build.BinariesDirectory)/Release:/Release nvcr.io/nvidia/pytorch:22.11-py3 \
bash -c "
bash -c '
set -ex; \
python3 --version; \
python3 -m pip install --upgrade pip; \
Expand All @@ -171,24 +171,25 @@ stages:
python3 -m pip install -r requirements-cuda11.txt; \
python3 -m pip install --upgrade polygraphy onnx-graphsurgeon --extra-index-url https://pypi.ngc.nvidia.com; \
echo Generate an image guided by a text prompt; \
python3 demo_txt2img.py --seed 1 --deter-infer 'astronaut riding a horse on mars'; \
popd; \
"
python3 demo_txt2img.py --seed 1 --deter-infer "stronaut riding a horse on mars" ; \
popd; '
displayName: 'Run stable diffusion demo'
workingDirectory: $(Build.SourcesDirectory)
- script: |
docker run --rm --gpus all -v $PWD:/workspace nvcr.io/nvidia/pytorch:22.11-py3 \
bash -c "
bash -c '
set -ex; \
python3 --version; \
python3 -m pip install --upgrade pip; \
pushd /workspace/onnxruntime/python/tools/transformers/models/stable_diffusion/test; \
pushd /workspace/onnxruntime/python/tools/transformers/models/stable_diffusion/; \
image2=$(find $(pwd) -name "astronaut_riding_a_h*.png") ; \
pushd test; \
python3 -m pip install -r requirements.txt; \
echo check generate image; \
python3 check_image --image1 "astronaut_riding_txt2image-DDIM-50.png" --image2 ; \
popd; \
"
echo check demo_txt2image.py's generate image; \
python3 -u check_image.py --image1 astronaut_riding_txt2image-DDIM-50.png --image2 $image2; \
popd; \
popd; '
displayName: 'Check the generated image'
workingDirectory: $(Build.SourcesDirectory)

Expand Down

0 comments on commit 0c3c04a

Please sign in to comment.