mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 17:44:38 +00:00
fixed a clip processing bug
This commit is contained in:
parent
7272165e0e
commit
bfc30066c9
2 changed files with 2 additions and 2 deletions
|
@ -2064,7 +2064,7 @@ bool clip_image_load_from_bytes(const unsigned char * bytes, size_t bytes_length
|
||||||
//check if image needs downscaling
|
//check if image needs downscaling
|
||||||
if (nx > maxdims || ny > maxdims) {
|
if (nx > maxdims || ny > maxdims) {
|
||||||
printf("\nImage requires resizing: original size %d x %d scaling to max %d px\n",nx,ny,maxdims);
|
printf("\nImage requires resizing: original size %d x %d scaling to max %d px\n",nx,ny,maxdims);
|
||||||
uint8_t* resized_image = scale_down_image(data, nx, ny, nc, maxdims, maxdims);
|
uint8_t* resized_image = scale_down_image(data, nx, ny, 3, maxdims, maxdims);
|
||||||
if(resized_image!=nullptr)
|
if(resized_image!=nullptr)
|
||||||
{
|
{
|
||||||
stbi_image_free(data); // Free the original image buffer and assign the new one
|
stbi_image_free(data); // Free the original image buffer and assign the new one
|
||||||
|
|
|
@ -111,6 +111,7 @@ static SDParams * sd_params = nullptr;
|
||||||
static sd_ctx_t * sd_ctx = nullptr;
|
static sd_ctx_t * sd_ctx = nullptr;
|
||||||
static int sddebugmode = 0;
|
static int sddebugmode = 0;
|
||||||
static std::string recent_data = "";
|
static std::string recent_data = "";
|
||||||
|
static uint8_t * input_image_buffer = NULL;
|
||||||
|
|
||||||
static std::string sdplatformenv, sddeviceenv, sdvulkandeviceenv;
|
static std::string sdplatformenv, sddeviceenv, sdvulkandeviceenv;
|
||||||
static bool notiling = false;
|
static bool notiling = false;
|
||||||
|
@ -301,7 +302,6 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs)
|
||||||
output.status = 0;
|
output.status = 0;
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
uint8_t * input_image_buffer = NULL;
|
|
||||||
sd_image_t * results;
|
sd_image_t * results;
|
||||||
sd_image_t* control_image = NULL;
|
sd_image_t* control_image = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue