diff --git a/pybind/AppBuilder.cpp b/pybind/AppBuilder.cpp index 18c64f0..2879720 100644 --- a/pybind/AppBuilder.cpp +++ b/pybind/AppBuilder.cpp @@ -76,11 +76,17 @@ PYBIND11_MODULE(appbuilder, m) { m.attr("__license__") = "BSD-3-Clause"; m.def("model_initialize", &initialize, "Initialize models."); +#ifdef _WIN32 m.def("model_initialize", &initialize_P, "Initialize models."); +#endif m.def("model_inference", &inference, "Inference models."); +#ifdef _WIN32 m.def("model_inference", &inference_P, "Inference models."); +#endif m.def("model_destroy", &destroy, "Destroy models."); +#ifdef _WIN32 m.def("model_destroy", &destroy_P, "Destroy models."); +#endif m.def("memory_create", &create_memory, "Create share memory."); m.def("memory_delete", &delete_memory, "Delete share memory."); m.def("set_log_level", &set_log_level, "Set QNN log level."); diff --git a/samples/python/README.md b/samples/python/README.md index 73bb0b7..e6d4e97 100644 --- a/samples/python/README.md +++ b/samples/python/README.md @@ -52,8 +52,8 @@ python stable_diffusion_v2_1\stable_diffusion_v2_1.py --prompt "spectacular view | Model | QNN SDK Version | Command | | ---- | :----: | ---- | -| stable_diffusion_v1_5 | 2.24 | python stable_diffusion_v2_1\stable_diffusion_v2_1.py --prompt "the prompt string ..." | -| stable_diffusion_v2_1 | 2.24 | python stable_diffusion_v1_5\stable_diffusion_v1_5.py --prompt "the prompt string ..." | +| stable_diffusion_v2_1 | 2.24 | python stable_diffusion_v2_1\stable_diffusion_v2_1.py --prompt "the prompt string ..." | +| stable_diffusion_v1_5 | 2.24 | python stable_diffusion_v1_5\stable_diffusion_v1_5.py --prompt "the prompt string ..." | | riffusion | 2.24 | python riffusion\riffusion.py --prompt "the prompt string ..." | | real_esrgan_x4plus | 2.28 | python real_esrgan_x4plus\real_esrgan_x4plus.py | | real_esrgan_general_x4v3 | 2.28 | python real_esrgan_general_x4v3\real_esrgan_general_x4v3.py | diff --git a/samples/python/real_esrgan_general_x4v3/input.jpg b/samples/python/real_esrgan_general_x4v3/input.jpg new file mode 100644 index 0000000..bf7a7ff Binary files /dev/null and b/samples/python/real_esrgan_general_x4v3/input.jpg differ diff --git a/samples/python/real_esrgan_general_x4v3/input.png b/samples/python/real_esrgan_general_x4v3/input.png deleted file mode 100644 index 5e0bd64..0000000 Binary files a/samples/python/real_esrgan_general_x4v3/input.png and /dev/null differ diff --git a/samples/python/real_esrgan_general_x4v3/real_esrgan_general_x4v3.py b/samples/python/real_esrgan_general_x4v3/real_esrgan_general_x4v3.py index f27e7cb..2855ddb 100644 --- a/samples/python/real_esrgan_general_x4v3/real_esrgan_general_x4v3.py +++ b/samples/python/real_esrgan_general_x4v3/real_esrgan_general_x4v3.py @@ -117,7 +117,7 @@ def Release(): Init() -Inference(execution_ws + "\\input.png", execution_ws + "\\output.png") +Inference(execution_ws + "\\input.jpg", execution_ws + "\\output.jpg") Release() diff --git a/samples/python/real_esrgan_x4plus/input.jpg b/samples/python/real_esrgan_x4plus/input.jpg new file mode 100644 index 0000000..bf7a7ff Binary files /dev/null and b/samples/python/real_esrgan_x4plus/input.jpg differ diff --git a/samples/python/real_esrgan_x4plus/input.png b/samples/python/real_esrgan_x4plus/input.png deleted file mode 100644 index 5e0bd64..0000000 Binary files a/samples/python/real_esrgan_x4plus/input.png and /dev/null differ diff --git a/samples/python/real_esrgan_x4plus/real_esrgan_x4plus.py b/samples/python/real_esrgan_x4plus/real_esrgan_x4plus.py index fa02f9a..bf6028b 100644 --- a/samples/python/real_esrgan_x4plus/real_esrgan_x4plus.py +++ b/samples/python/real_esrgan_x4plus/real_esrgan_x4plus.py @@ -116,7 +116,7 @@ def Release(): Init() -Inference(execution_ws + "\\input.png", execution_ws + "\\output.png") +Inference(execution_ws + "\\input.jpg", execution_ws + "\\output.jpg") Release() diff --git a/src/Utils/DataUtil.cpp b/src/Utils/DataUtil.cpp index 4502728..12657e0 100644 --- a/src/Utils/DataUtil.cpp +++ b/src/Utils/DataUtil.cpp @@ -12,7 +12,9 @@ #include #include #include +#ifdef _WIN32 #include +#endif #include "DataUtil.hpp" #include "Logger.hpp" #ifndef __hexagon__