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

Multiple images mini cpm v 2 6 #67

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
9177756
convert.py script deprecation and llm-bench README update (#916)
andrei-kochin Oct 3, 2024
3d0e5ba
Temp
Wovchena Oct 4, 2024
57bb044
Add macos
Wovchena Oct 6, 2024
5efc24b
and
Wovchena Oct 6, 2024
c473d2a
cmp
Wovchena Oct 6, 2024
c780a2e
cmp
Wovchena Oct 6, 2024
68d0134
matrix
Wovchena Oct 6, 2024
7f4cafb
runner
Wovchena Oct 6, 2024
b316c92
env
Wovchena Oct 6, 2024
797d8ed
shorten
Wovchena Oct 6, 2024
3d9886b
matrix
Wovchena Oct 6, 2024
5b00440
4 cores
Wovchena Oct 6, 2024
798f42d
./
Wovchena Oct 6, 2024
ee057ba
env
Wovchena Oct 6, 2024
e88ae49
ld
Wovchena Oct 6, 2024
382bcbc
ld
Wovchena Oct 6, 2024
30dc931
tbb
Wovchena Oct 6, 2024
4c61b12
and
Wovchena Oct 6, 2024
1ff0889
8
Wovchena Oct 6, 2024
3a800a1
LD_LIBRARY_PATH
Wovchena Oct 6, 2024
8a3a21b
TBB_DIR
Wovchena Oct 6, 2024
99911bc
move
Wovchena Oct 6, 2024
6ac98c5
echo
Wovchena Oct 6, 2024
53f3154
16
Wovchena Oct 6, 2024
55af01e
LD
Wovchena Oct 6, 2024
f064bdc
Remove ls
Wovchena Oct 6, 2024
21da18b
timeout-minutes: 1
Wovchena Oct 6, 2024
44f21c0
timeout-minutes: 2
Wovchena Oct 6, 2024
02c928e
setuvars
Wovchena Oct 6, 2024
f327e8c
fix jump
Wovchena Oct 6, 2024
0eb693e
tbb
Wovchena Oct 6, 2024
ddb1c29
DYLD_LIBRARY_PATH
Wovchena Oct 6, 2024
0ea2656
source ./ov/setupvars.sh
Wovchena Oct 6, 2024
c1d1f3b
4
Wovchena Oct 6, 2024
7a00aa5
timeout-minutes: 8
Wovchena Oct 7, 2024
33e1cef
timeout-minutes: 16
Wovchena Oct 7, 2024
12a7134
timeout-minutes: 32
Wovchena Oct 7, 2024
b11f0d9
StaticLLMPipeline: Enable DQ (#878)
TolyaTalamanov Oct 7, 2024
c166e5f
Update the model
Wovchena Oct 7, 2024
41f1e7b
LoRA in Text2ImagePipeline (#911)
slyalin Oct 7, 2024
df9420d
Fix macos compilation
Wovchena Oct 7, 2024
871f334
spelling
Wovchena Oct 7, 2024
68e9870
Drop mac test
Wovchena Oct 8, 2024
db14fd0
WWB: Add comparison for SD models (#901)
AlexKoff88 Oct 8, 2024
ff38f90
Remove excess comma in src/cpp/CMakeLists.txt (#927)
ilya-lavrenov Oct 8, 2024
a0b78c0
Update README.md
rkazants Oct 8, 2024
8c9a240
Update samples/cpp/text2image/README.md
rkazants Oct 8, 2024
abbc695
Fix the misprint (#928)
andrei-kochin Oct 8, 2024
93927b5
MiniCPM-V-2_6 with image input (#912)
Wovchena Oct 8, 2024
a5fb3a6
Fix misprint (#929)
Wovchena Oct 8, 2024
aa7bfd6
fix cb llm bench for gpu, allow string config
eaidova Oct 8, 2024
117d790
fix cb llm bench for gpu, allow string config (#931)
andrei-kochin Oct 8, 2024
aaf731c
fix linting issue in llm bench (#932)
eaidova Oct 8, 2024
14df316
disable md5 check assert for CB
eaidova Oct 8, 2024
09c5742
disable md5 check assert for CB (#933)
andrei-kochin Oct 8, 2024
4465727
Use older MSVC toolchain version
ilya-lavrenov Oct 8, 2024
7f9a579
Use OpenVINO runners
ilya-lavrenov Oct 8, 2024
9d1e7e3
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
2c56899
Try to fix Windows
ilya-lavrenov Oct 8, 2024
4aa01ca
Added &
ilya-lavrenov Oct 8, 2024
0afb553
Update stable_diffusion_1_5_cpp.yml
ilya-lavrenov Oct 8, 2024
4ae6b18
Update stable_diffusion_1_5_cpp.yml
ilya-lavrenov Oct 8, 2024
3e772fd
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
0b55cd0
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
22c573d
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
fcd6670
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
e7c1371
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
78bbf62
Update .github/workflows/stable_diffusion_1_5_cpp.yml
ilya-lavrenov Oct 8, 2024
581e2c1
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
d43773c
SDXL Pipeline, Euler Discrete scheduler
likholat Sep 27, 2024
0663533
text2image Readme update
likholat Oct 7, 2024
f4e90aa
num_images_per_prompt>1 for demo, unet reshape fix, num_hidden_layers…
likholat Oct 8, 2024
ea8b9fa
Readme update
likholat Oct 8, 2024
df2161d
codestyle fixes
likholat Oct 8, 2024
8db0301
Apply suggestions from code review
ilya-lavrenov Oct 8, 2024
b9eed0a
Added VLM bindings and a Python sample. (#914)
popovaan Oct 9, 2024
6c93bbd
Merge branch 'master' into multiple-images-miniCPM-V-2_6
Wovchena Oct 9, 2024
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
29 changes: 21 additions & 8 deletions .github/workflows/causal_lm_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

env:
l_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-16570-19eb02fe60b/l_openvino_toolkit_ubuntu20_2024.5.0.dev20240830_x86_64.tgz
l_u22_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-16570-19eb02fe60b/l_openvino_toolkit_ubuntu22_2024.5.0.dev20240830_x86_64.tgz
m_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-16570-19eb02fe60b/m_openvino_toolkit_macos_12_6_2024.5.0.dev20240830_x86_64.tgz
w_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-16570-19eb02fe60b/w_openvino_toolkit_windows_2024.5.0.dev20240830_x86_64.zip
jobs:
Expand Down Expand Up @@ -202,8 +203,7 @@ jobs:
echo "Multi prompt" passed

cpp-greedy_causal_lm-windows:
runs-on: windows-latest
if: ${{ false }} # TODO: fix Windows
runs-on: windows-2019-16-core
env:
PYTHONIOENCODING: "utf8"
defaults:
Expand All @@ -218,6 +218,8 @@ jobs:
python-version: 3.9
- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
toolset: 14.29
- run: curl --output ov.zip ${{ env.w_ov_link }}
- run: unzip -d ov ov.zip
- run: dirs=(ov/*) && mv ov/*/* ov && rmdir "${dirs[@]}"
Expand Down Expand Up @@ -681,7 +683,7 @@ jobs:
diff pred2.txt ref.txt
echo "Chat sample python" passed

py-vlm_chat_sample-ubuntu:
visual_chat_sample-ubuntu:
runs-on: ubuntu-22.04-16-cores
steps:
- uses: actions/checkout@v4
Expand All @@ -693,7 +695,7 @@ jobs:
- name: Install OpenVINO
run: |
mkdir ./ov/
curl ${{ env.l_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
curl ${{ env.l_u22_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
sudo ./ov/install_dependencies/install_openvino_dependencies.sh
- name: Build app
run: |
Expand All @@ -707,10 +709,19 @@ jobs:
python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python ./samples/cpp/visual_language_chat/export_MiniCPM-V-2_6.py ./miniCPM-V-2_6/
wget https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11
- run: |

- name: Run chat chat sample
run: >
source ./ov/setupvars.sh
timeout 2m ./build/samples/cpp/visual_language_chat/visual_language_chat ./miniCPM-V-2_6/ d5fbbd1a-d484-415c-88cb-9986625b7b11
&& timeout 120s ./build/samples/cpp/visual_language_chat/visual_language_chat ./miniCPM-V-2_6/ d5fbbd1a-d484-415c-88cb-9986625b7b11
<<< $'What is on the image?\nWhat is special on the image?'
- name: Run Python chat sample
run: |
source ./ov/setupvars.sh
export PYTHONPATH=./build/:$PYTHONPATH
printf 'What is on the image?\nWhat is special on the image?\n' > ./input.txt
timeout 120s python ./samples/python/vlm_chat_sample/vlm_chat_sample.py ./miniCPM-V-2_6/ d5fbbd1a-d484-415c-88cb-9986625b7b11 < input.txt > ./pred.txt || ( [[ $? -eq 124 ]] && \
echo "Timeout reached, but it's excpected." )

cpp-continuous-batching-ubuntu:
runs-on: ubuntu-20.04-8-cores
Expand Down Expand Up @@ -756,8 +767,7 @@ jobs:
timeout 200s ./build/samples/cpp/continuous_batching_benchmark/continuous_batching_benchmark -n 10 --dynamic_split_fuse --max_batch_size 256 --max_input_len 256 -m ./TinyLlama-1.1B-Chat-v1.0/ --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --cache_size 1

cpp-continuous-batching-windows:
runs-on: windows-latest
if: ${{ false }} # TODO: fix Windows
runs-on: windows-2019-16-core
env:
PYTHONIOENCODING: "utf8"
defaults:
Expand All @@ -772,6 +782,8 @@ jobs:
python-version: 3.9
- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
toolset: 14.29
- name: Install OpenVINO
run: |
curl --output ov.zip ${{ env.w_ov_link }}
Expand Down Expand Up @@ -854,6 +866,7 @@ jobs:
cpp-beam_search_causal_lm-Qwen-7B-Chat, cpp-beam_search_causal_lm-Qwen1_5-7B-Chat, cpp-beam_search_causal_lm-Phi-2,
cpp-beam_search_causal_lm-notus-7b-v1, cpp-speculative_decoding_lm-ubuntu, cpp-prompt_lookup_decoding_lm-ubuntu,
cpp-Phi-1_5, cpp-greedy_causal_lm-redpajama-3b-chat, cpp-chat_sample-ubuntu, cpp-continuous-batching-ubuntu,
visual_language_sample-ubuntu,
cpp-continuous-batching-windows, cpp-continuous-batching-macos]
if: ${{ always() }}
runs-on: ubuntu-latest
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/lcm_dreamshaper_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ jobs:
- name: Run app
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
./build/samples/cpp/stable_diffusion/stable_diffusion ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
./build/samples/cpp/text2image/stable_diffusion ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"

lcm_dreamshaper_v7_cpp-windows:
runs-on: windows-latest
if: ${{ false }} # TODO: fix Windows
runs-on: windows-2019-16-core
defaults:
run:
shell: pwsh
Expand All @@ -89,6 +88,11 @@ jobs:
mv ./tmp/*/* .
popd

- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
toolset: 14.29

- name: Build app
run: |
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
Expand Down Expand Up @@ -116,9 +120,9 @@ jobs:
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 --task stable-diffusion --weight-format fp16 models/lcm_dreamshaper_v7/FP16

- name: Run app
run: |
run: >
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
./build/samples/cpp/stable_diffusion/Release/lcm_dreamshaper.exe ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
& "./build/samples/cpp/text2image/Release/stable_diffusion.exe ./models/lcm_dreamshaper_v7/FP16 'cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting'"

Overall_Status:
name: ci/gha_overall_status_lcm
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/llm_bench-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install flake8 pytest black
GIT_CLONE_PROTECTION_ACTIVE=false pip install -r ${{ env.LLM_BENCH_PYPATH }}/requirements.txt
python -m pip install -U --pre openvino openvino-tokenizers openvino-genai --extra-index-url
https://storage.openvinotoolkit.org/simple/wheels/nightly
GIT_CLONE_PROTECTION_ACTIVE=false pip install -r ${{ env.WWB_PATH }}/requirements.txt
GIT_CLONE_PROTECTION_ACTIVE=false pip install ${{ env.WWB_PATH }}

python -m pip install -U --pre openvino openvino-tokenizers openvino-genai --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down Expand Up @@ -74,6 +70,9 @@ https://storage.openvinotoolkit.org/simple/wheels/nightly
python ./llm_bench/python/benchmark.py -m ./ov_models/tiny-sd/pytorch/dldt/FP16/ -pf ./llm_bench/python/prompts/stable-diffusion.jsonl -d cpu -n 1
- name: WWB Tests
run: |
GIT_CLONE_PROTECTION_ACTIVE=false pip install -r ${{ env.WWB_PATH }}/requirements.txt
pip install git+https://github.com/huggingface/optimum.git
GIT_CLONE_PROTECTION_ACTIVE=false pip install ${{ env.WWB_PATH }}
python -m pytest llm_bench/python/who_what_benchmark/tests
stateful:
runs-on: ubuntu-20.04
Expand All @@ -86,13 +85,13 @@ https://storage.openvinotoolkit.org/simple/wheels/nightly
run: |
GIT_CLONE_PROTECTION_ACTIVE=false python -m pip install -r llm_bench/python/requirements.txt
python -m pip uninstall --yes openvino
python -m pip install -U --pre openvino openvino-tokenizers openvino-genai --extra-index-url
https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -U --pre openvino openvino-tokenizers openvino-genai --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python llm_bench/python/convert.py --model_id TinyLlama/TinyLlama-1.1B-Chat-v1.0 --output_dir . --stateful
grep beam_idx pytorch/dldt/FP32/openvino_model.xml
- name: WWB Tests
run: |
GIT_CLONE_PROTECTION_ACTIVE=false pip install -r llm_bench/python/who_what_benchmark/requirements.txt
pip install git+https://github.com/huggingface/optimum.git
GIT_CLONE_PROTECTION_ACTIVE=false pip install llm_bench/python/who_what_benchmark/
pip install pytest
python -m pytest llm_bench/python/who_what_benchmark/tests
30 changes: 23 additions & 7 deletions .github/workflows/stable_diffusion_1_5_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,20 @@ jobs:
run: |
source openvino_sd_cpp/bin/activate
optimum-cli export openvino --model dreamlike-art/dreamlike-anime-1.0 --weight-format fp16 --task stable-diffusion models/dreamlike-art-dreamlike-anime-1.0/FP16
wget -O ./models/soulcard.safetensors https://civitai.com/api/download/models/72591

- name: Run app
- name: Run main app
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
./build/samples/cpp/stable_diffusion/stable_diffusion ./models/dreamlike-art-dreamlike-anime-1.0/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
./build/samples/cpp/text2image/stable_diffusion ./models/dreamlike-art-dreamlike-anime-1.0/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"

- name: Run LoRA app
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
./build/samples/cpp/text2image/lora_stable_diffusion ./models/dreamlike-art-dreamlike-anime-1.0/FP16 "curly-haired unicorn in the forest, anime, line" ./models/soulcard.safetensors 0.7

stable_diffusion_1_5_cpp-windows:
runs-on: windows-latest
if: ${{ false }} # TODO: fix Windows
runs-on: windows-2019-16-core
defaults:
run:
shell: pwsh
Expand All @@ -89,6 +94,11 @@ jobs:
mv ./tmp/*/* .
popd

- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
toolset: 14.29

- name: Build app
run: |
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
Expand All @@ -114,11 +124,17 @@ jobs:
run: |
. "./openvino_sd_cpp/Scripts/Activate.ps1"
optimum-cli export openvino --model dreamlike-art/dreamlike-anime-1.0 --task stable-diffusion --weight-format fp16 models/dreamlike-art-dreamlike-anime-1.0/FP16
Invoke-WebRequest -Uri 'https://civitai.com/api/download/models/72591' -OutFile 'models/soulcard.safetensors'

- name: Run app
run: |
- name: Run main app
run: >
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
& "./build/samples/cpp/text2image/Release/stable_diffusion.exe ./models/dreamlike-art-dreamlike-anime-1.0/FP16 'cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting'"

- name: Run LoRA app
run: >
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
./build/samples/cpp/stable_diffusion/Release/stable_diffusion.exe ./models/dreamlike-art-dreamlike-anime-1.0/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
& "./build/samples/cpp/text2image/Release/lora_stable_diffusion.exe ./models/dreamlike-art-dreamlike-anime-1.0/FP16 'curly-haired unicorn in the forest, anime, line' ./models/soulcard.safetensors 0.7"

Overall_Status:
name: ci/gha_overall_status_stable_diffusion
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ It includes the following pipelines:
6. [multinomial_causal_lm](./samples/cpp/multinomial_causal_lm/README.md)
7. [prompt_lookup_decoding_lm](./samples/cpp/prompt_lookup_decoding_lm/README.md)
8. [speculative_decoding_lm](./samples/cpp/speculative_decoding_lm/README.md)
3. [Stable Diffuison and Latent Consistency Model (with LoRA) C++ image generation pipeline](./samples/cpp/stable_diffusion/README.md)
3. [Stable Diffuison and Latent Consistency Model (with LoRA) C++ image generation pipeline](./samples/cpp/text2image/README.md)

### Requirements

Expand Down
Loading
Loading