Skip to content

nightly->rc1

nightly->rc1 #515

name: lcm_dreamshaper
on:
pull_request:
paths:
- image_generation/lcm_dreamshaper_v7/cpp/**
- image_generation/common/**
- samples/requirements.txt
- .github/workflows/lcm_dreamshaper_cpp.yml
- thirdparty/openvino_tokenizers
- "!**.md"
permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions
env:
working_directory: "./image_generation/lcm_dreamshaper_v7/cpp/"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lcm_dreamshaper_v7_cpp-linux:
runs-on: ubuntu-20.04
defaults:
run:
# Do not ignore bash profile files. From:
# https://github.com/marketplace/actions/setup-miniconda#important
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: openvino_lcm_cpp
python-version: "3.10"
- name: Install OpenVINO and other conda dependencies
run: |
conda activate openvino_lcm_cpp
conda update -c conda-forge --all
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.3.0.dev20240614 c-compiler cxx-compiler git make cmake
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
- name: Install python dependencies
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_lcm_cpp
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
python -m pip install -r ../../requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
- name: Download and convert model and tokenizer
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_lcm_cpp
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 models/lcm_dreamshaper_v7/FP16
- name: Build app
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_lcm_cpp
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release --parallel
- name: Run app
working-directory: ${{ env.working_directory }}
run: ./build/lcm_dreamshaper
lcm_dreamshaper_v7_cpp-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: openvino_lcm_cpp
python-version: "3.10"
- name: Install OpenVINO and other conda dependencies
run: |
conda activate openvino_lcm_cpp
conda update -c conda-forge --all
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.3.0.dev20240614 c-compiler cxx-compiler git make cmake
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
- name: Install python dependencies
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_lcm_cpp
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
python -m pip install -r ../../requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
- name: Download and convert model and tokenizer
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_lcm_cpp
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 models/lcm_dreamshaper_v7/FP16
- name: Build app
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_lcm_cpp
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release --parallel
- name: Run app
working-directory: ${{ env.working_directory }}
run: '& "./build/Release/lcm_dreamshaper.exe" -r --dynamic'