Skip to content

Commit

Permalink
Merge branch 'master' into anzr299-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Dec 17, 2024
2 parents 9f07e91 + 973b26b commit 6675440
Show file tree
Hide file tree
Showing 65 changed files with 2,041 additions and 509 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/lcm_dreamshaper_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,35 +62,35 @@ jobs:
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -r ./samples/requirements.txt
- name: Download and convert models and tokenizer
- name: Download models
run: |
source openvino_lcm_cpp/bin/activate
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 --task stable-diffusion --weight-format fp16 models/lcm_dreamshaper_v7/FP16
huggingface-cli download OpenVINO/LCM_Dreamshaper_v7-int8-ov --local-dir models/lcm_dreamshaper_v7
wget -O ./image.png https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png
wget -O ./mask_image.png https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png
- name: Run heterogeneous_stable_diffusion
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
${{ env.build_dir }}/samples/cpp/image_generation/heterogeneous_stable_diffusion ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
${{ env.build_dir }}/samples/cpp/image_generation/heterogeneous_stable_diffusion ./models/lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
- name: Run heterogeneous_stable_diffusion.py
run: |
source openvino_lcm_cpp/bin/activate
source ./ov/setupvars.sh
python ./samples/python/image_generation/heterogeneous_stable_diffusion.py ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
python ./samples/python/image_generation/heterogeneous_stable_diffusion.py ./models/lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
env:
PYTHONPATH: ${{ env.build_dir }}

- name: Run image2image
run: |
source ./ov/setupvars.sh
${{ env.build_dir }}/samples/cpp/image_generation/image2image ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" ./image.png
${{ env.build_dir }}/samples/cpp/image_generation/image2image ./models/lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" ./image.png
- name: Run inpainting
run: |
source ./ov/setupvars.sh
${{ env.build_dir }}/samples/cpp/image_generation/inpainting ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" ./image.png ./mask_image.png
${{ env.build_dir }}/samples/cpp/image_generation/inpainting ./models/lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" ./image.png ./mask_image.png
lcm_dreamshaper_v7_cpp-windows:
runs-on: windows-2019
Expand Down Expand Up @@ -134,24 +134,24 @@ jobs:
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -r ./samples/requirements.txt
- name: Download and convert models and tokenizer
- name: Download models
run: |
. "./openvino_lcm_cpp/Scripts/Activate.ps1"
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 --task stable-diffusion --weight-format fp16 models/lcm_dreamshaper_v7/FP16
huggingface-cli download OpenVINO/LCM_Dreamshaper_v7-int8-ov --local-dir models/lcm_dreamshaper_v7
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png' -OutFile 'image.png'
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png' -OutFile 'mask_image.png'
- name: Run heterogeneous_stable_diffusion
run: >
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
& "${{ env.build_dir }}/samples/cpp/image_generation/Release/heterogeneous_stable_diffusion.exe ./models/lcm_dreamshaper_v7/FP16 'cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting'"
& "${{ env.build_dir }}/samples/cpp/image_generation/Release/heterogeneous_stable_diffusion.exe ./models/lcm_dreamshaper_v7 'cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting'"
- name: Run heterogeneous_stable_diffusion.py
run: |
. "./openvino_lcm_cpp/Scripts/Activate.ps1"
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
$env:Path += "${{ env.build_dir }}\openvino_genai"
python .\samples\python\image_generation\heterogeneous_stable_diffusion.py .\models\lcm_dreamshaper_v7\FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
python .\samples\python\image_generation\heterogeneous_stable_diffusion.py .\models\lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
env:
PYTHONPATH: ${{ env.build_dir }}

Expand All @@ -160,7 +160,7 @@ jobs:
. "./openvino_lcm_cpp/Scripts/Activate.ps1"
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
$env:Path += "${{ env.build_dir }}\openvino_genai"
python .\samples\python\image_generation\image2image.py .\models\lcm_dreamshaper_v7\FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" .\image.png
python .\samples\python\image_generation\image2image.py .\models\lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" .\image.png
env:
PYTHONPATH: ${{ env.build_dir }}

Expand All @@ -169,7 +169,7 @@ jobs:
. "./openvino_lcm_cpp/Scripts/Activate.ps1"
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
$env:Path += "${{ env.build_dir }}\openvino_genai"
python .\samples\python\image_generation\inpainting.py .\models\lcm_dreamshaper_v7\FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" .\image.png .\mask_image.png
python .\samples\python\image_generation\inpainting.py .\models\lcm_dreamshaper_v7 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting" .\image.png .\mask_image.png
env:
PYTHONPATH: ${{ env.build_dir }}

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
status: ${{ steps.openvino_download.outcome }}
ov_artifact_name: ${{ steps.openvino_download.outputs.ov_artifact_name }}
ov_wheel_source: ${{ steps.openvino_download.outputs.ov_wheel_source }}
ov_version: ${{ steps.openvino_download.outputs.ov_version }}
docker_tag: ${{ steps.get_docker_tag.outputs.docker_tag }}
timeout-minutes: 10
defaults:
Expand Down Expand Up @@ -147,7 +146,6 @@ jobs:
OV_INSTALL_DIR: ${{ github.workspace }}/ov
INSTALL_DIR: ${{ github.workspace }}/install
WHEELS_DIR: ${{ github.workspace }}/install/wheels
BUILD_DIR: ${{ github.workspace }}/build
SRC_DIR: ${{ github.workspace }}/src

steps:
Expand Down Expand Up @@ -271,14 +269,12 @@ jobs:
test:
- name: 'Whisper'
cmd: 'tests/python_tests/test_whisper_generate_api.py'
runner: aks-linux-8-cores-32gb
- name: 'LLM & VLM'
cmd: 'tests/python_tests --ignore tests/python_tests/test_whisper_generate_api.py -k "not Qwen2-0.5B-Instruct"' # Skip failed tests Qwen2-0.5B-Instruct
runner: aks-linux-4-cores-16gb
defaults:
run:
shell: bash
runs-on: ${{ matrix.test.runner }}
runs-on: aks-linux-4-cores-16gb
container:
image: openvinogithubactions.azurecr.io/ov_test/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }}
volumes:
Expand Down
Loading

0 comments on commit 6675440

Please sign in to comment.