From 9140a5af94671897f04bb4e6df5ebe858580e142 Mon Sep 17 00:00:00 2001 From: Anastasiia Pnevskaia Date: Wed, 23 Oct 2024 10:48:22 +0200 Subject: [PATCH 1/4] Readme fix. --- samples/python/text2image/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/python/text2image/README.md b/samples/python/text2image/README.md index 3be523b4a8..767072171f 100644 --- a/samples/python/text2image/README.md +++ b/samples/python/text2image/README.md @@ -15,6 +15,10 @@ Users can change the sample code and play with the following generation paramete - (SD 1.x, 2.x only) Add negative prompt when guidance scale > 1 - Apply multiple different LoRA adapters and mix them with different blending coefficients +## Install OpenVINO™ GenAI and its dependencies + +The instruction is provided in the [`README`](../../../README.md). + ## Download and convert the models and tokenizers The `--upgrade-strategy eager` option is needed to ensure `optimum-intel` is upgraded to the latest version. @@ -47,7 +51,7 @@ Here is an example how to run the sample with a single adapter. First download a Then run `lora.py`: -`python lora.py ./lora_stable_diffusion dreamlike_anime_1_0_ov/FP16 "curly-haired unicorn in the forest, anime, line" soulcard.safetensors 0.7` +`python lora.py ./dreamlike_anime_1_0_ov/FP16 "curly-haired unicorn in the forest, anime, line" soulcard.safetensors 0.7` The sample generates two images with and without adapters applied using the same prompt: - `lora.bmp` with adapters applied From 157b1378c5dbae1023fa520886dbcb81ab0b6830 Mon Sep 17 00:00:00 2001 From: Anastasiia Pnevskaia Date: Wed, 23 Oct 2024 11:06:36 +0200 Subject: [PATCH 2/4] Removed 'python' from commands. --- samples/python/text2image/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/python/text2image/README.md b/samples/python/text2image/README.md index 767072171f..679cd01118 100644 --- a/samples/python/text2image/README.md +++ b/samples/python/text2image/README.md @@ -32,7 +32,7 @@ optimum-cli export openvino --model dreamlike-art/dreamlike-anime-1.0 --task sta ## Run -`python main.py ./dreamlike_anime_1_0_ov/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"` +`main.py ./dreamlike_anime_1_0_ov/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"` ### Examples @@ -51,7 +51,7 @@ Here is an example how to run the sample with a single adapter. First download a Then run `lora.py`: -`python lora.py ./dreamlike_anime_1_0_ov/FP16 "curly-haired unicorn in the forest, anime, line" soulcard.safetensors 0.7` +`lora.py ./dreamlike_anime_1_0_ov/FP16 "curly-haired unicorn in the forest, anime, line" soulcard.safetensors 0.7` The sample generates two images with and without adapters applied using the same prompt: - `lora.bmp` with adapters applied From f4e108f8736af0d0f9fcd01c2f4ac16c32ddd1c7 Mon Sep 17 00:00:00 2001 From: Anastasiia Pnevskaia Date: Wed, 23 Oct 2024 15:38:01 +0200 Subject: [PATCH 3/4] Added link to readme in samples/cpp, added deployment-requirements.txt. --- samples/python/text2image/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/python/text2image/README.md b/samples/python/text2image/README.md index 679cd01118..d6e90703f7 100644 --- a/samples/python/text2image/README.md +++ b/samples/python/text2image/README.md @@ -15,9 +15,9 @@ Users can change the sample code and play with the following generation paramete - (SD 1.x, 2.x only) Add negative prompt when guidance scale > 1 - Apply multiple different LoRA adapters and mix them with different blending coefficients -## Install OpenVINO™ GenAI and its dependencies +## Setup OpenVINO™ -The instruction is provided in the [`README`](../../../README.md). +Setup OpenVINO™ according to [`instruction`](../../cpp/README.md). ## Download and convert the models and tokenizers @@ -32,7 +32,8 @@ optimum-cli export openvino --model dreamlike-art/dreamlike-anime-1.0 --task sta ## Run -`main.py ./dreamlike_anime_1_0_ov/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"` +`pip install --upgrade-strategy eager -r ../../deployment-requirements.txt` +`python main.py ./dreamlike_anime_1_0_ov/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"` ### Examples @@ -51,7 +52,7 @@ Here is an example how to run the sample with a single adapter. First download a Then run `lora.py`: -`lora.py ./dreamlike_anime_1_0_ov/FP16 "curly-haired unicorn in the forest, anime, line" soulcard.safetensors 0.7` +`python lora.py ./dreamlike_anime_1_0_ov/FP16 "curly-haired unicorn in the forest, anime, line" soulcard.safetensors 0.7` The sample generates two images with and without adapters applied using the same prompt: - `lora.bmp` with adapters applied From ddc3dbc0886cca9b7ddd951842909ffd4dd1ce26 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 28 Oct 2024 22:44:44 +0400 Subject: [PATCH 4/4] Update README.md --- samples/python/text2image/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/samples/python/text2image/README.md b/samples/python/text2image/README.md index d6e90703f7..b21e800ca4 100644 --- a/samples/python/text2image/README.md +++ b/samples/python/text2image/README.md @@ -15,10 +15,6 @@ Users can change the sample code and play with the following generation paramete - (SD 1.x, 2.x only) Add negative prompt when guidance scale > 1 - Apply multiple different LoRA adapters and mix them with different blending coefficients -## Setup OpenVINO™ - -Setup OpenVINO™ according to [`instruction`](../../cpp/README.md). - ## Download and convert the models and tokenizers The `--upgrade-strategy eager` option is needed to ensure `optimum-intel` is upgraded to the latest version. @@ -32,7 +28,6 @@ optimum-cli export openvino --model dreamlike-art/dreamlike-anime-1.0 --task sta ## Run -`pip install --upgrade-strategy eager -r ../../deployment-requirements.txt` `python main.py ./dreamlike_anime_1_0_ov/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"` ### Examples