Skip to content

Commit

Permalink
restore sample
Browse files Browse the repository at this point in the history
  • Loading branch information
xufang-lisa committed Jan 9, 2025
1 parent 808308c commit a09aad0
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ int32_t main(int32_t argc, char* argv[]) try {
ov::genai::num_inference_steps(number_of_inference_steps_per_image));

imwrite("image_" + std::to_string(imagei) + ".bmp", image, true);
auto perf_metrics = pipe.get_perfomance_metrics();
std::cout << "pipeline generate duration ms:" << perf_metrics.generate_duration / 1000.0f << std::endl;
std::cout << "pipeline inference duration ms:" << perf_metrics.get_inference_total_duration() << std::endl;
std::cout << "pipeline iteration:" << perf_metrics.raw_metrics.iteration_durations.size() << std::endl;
}

return EXIT_SUCCESS;
Expand Down
4 changes: 0 additions & 4 deletions samples/cpp/image_generation/image2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ int32_t main(int32_t argc, char* argv[]) try {

// writes `num_images_per_prompt` images by pattern name
imwrite("image_%d.bmp", generated_image, true);
auto perf_metrics = pipe.get_perfomance_metrics();
std::cout << "pipeline generate duration ms:" << perf_metrics.generate_duration / 1000.0f << std::endl;
std::cout << "pipeline inference duration ms:" << perf_metrics.get_inference_total_duration() << std::endl;
std::cout << "pipeline iteration:" << perf_metrics.raw_metrics.iteration_durations.size() << std::endl;

return EXIT_SUCCESS;
} catch (const std::exception& error) {
Expand Down
5 changes: 0 additions & 5 deletions samples/cpp/image_generation/inpainting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ int32_t main(int32_t argc, char* argv[]) try {
// writes `num_images_per_prompt` images by pattern name
imwrite("image_%d.bmp", generated_image, true);

auto perf_metrics = pipe.get_perfomance_metrics();
std::cout << "pipeline generate duration ms:" << perf_metrics.generate_duration / 1000.0f << std::endl;
std::cout << "pipeline inference duration ms:" << perf_metrics.get_inference_total_duration() << std::endl;
std::cout << "pipeline iteration:" << perf_metrics.raw_metrics.iteration_durations.size() << std::endl;

return EXIT_SUCCESS;
} catch (const std::exception& error) {
try {
Expand Down
8 changes: 0 additions & 8 deletions samples/cpp/image_generation/lora_text2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ int32_t main(int32_t argc, char* argv[]) try {
ov::genai::num_inference_steps(20),
ov::genai::rng_seed(42));
imwrite("lora.bmp", image, true);
auto perf_metrics = pipe.get_perfomance_metrics();
std::cout << "pipeline generate duration ms:" << perf_metrics.generate_duration / 1000.0f << std::endl;
std::cout << "pipeline inference duration ms:" << perf_metrics.get_inference_total_duration() << std::endl;
std::cout << "pipeline iteration:" << perf_metrics.raw_metrics.iteration_durations.size() << std::endl;

std::cout << "Generating image without LoRA adapters applied, resulting image will be in baseline.bmp\n";
image = pipe.generate(prompt,
Expand All @@ -42,10 +38,6 @@ int32_t main(int32_t argc, char* argv[]) try {
ov::genai::num_inference_steps(20),
ov::genai::rng_seed(42));
imwrite("baseline.bmp", image, true);
perf_metrics = pipe.get_perfomance_metrics();
std::cout << "pipeline generate duration ms:" << perf_metrics.generate_duration / 1000.0f << std::endl;
std::cout << "pipeline inference duration ms:" << perf_metrics.get_inference_total_duration() << std::endl;
std::cout << "pipeline iteration:" << perf_metrics.raw_metrics.iteration_durations.size() << std::endl;

return EXIT_SUCCESS;
} catch (const std::exception& error) {
Expand Down
5 changes: 0 additions & 5 deletions samples/cpp/image_generation/text2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ int32_t main(int32_t argc, char* argv[]) try {
// writes `num_images_per_prompt` images by pattern name
imwrite("image_%d.bmp", image, true);

auto perf_metrics = pipe.get_perfomance_metrics();
std::cout << "pipeline generate duration ms:" << perf_metrics.generate_duration / 1000.0f << std::endl;
std::cout << "pipeline inference duration ms:" << perf_metrics.get_inference_total_duration() << std::endl;
std::cout << "pipeline iteration:" << perf_metrics.raw_metrics.iteration_durations.size() << std::endl;

return EXIT_SUCCESS;
} catch (const std::exception& error) {
try {
Expand Down

0 comments on commit a09aad0

Please sign in to comment.