diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index 8691c6da2a204e..95fe42fa91dabe 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -334,7 +334,7 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) sd_params->mode = (img2img_data==""?SDMode::TXT2IMG:SDMode::IMG2IMG); //ensure unsupported dimensions are fixed - int biggestdim = std::max(sd_params->width,sd_params->height); + int biggestdim = (sd_params->width>sd_params->height?sd_params->width:sd_params->height); auto loadedsdver = get_loaded_sd_version(sd_ctx); if(loadedsdver==SDVersion::VERSION_FLUX_DEV || loadedsdver==SDVersion::VERSION_FLUX_SCHNELL) {