From 79c8e87922f914913c656d0cd689f5adef6e9b50 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 6 Apr 2024 19:58:58 +0800 Subject: [PATCH] remove constraint for img dimension --- otherarch/sdcpp/sdtype_adapter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index b168b86e3..cd231d22f 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -372,8 +372,8 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) input_image_buffer = stbi_load_from_memory(image_buffer.data(), image_buffer.size(), &nx, &ny, &nc, 3); - if (nx <= 0 || nx % 64 != 0 || ny <= 0 || ny % 64 != 0 || nc!= 3) { - printf("\nKCPP SD: bad input image dimensions!\n"); + if (nx < 64 || ny < 64 || nc!= 3) { + printf("\nKCPP SD: bad input image dimensions %d x %d!\n",nx,ny); output.data = ""; output.status = 0; return output;