Skip to content

Commit 968025d

Browse files
committed
fix mask_image channels + remove duplicated preview_interval parsing
1 parent 14f15a8 commit 968025d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

examples/server/main.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ bool parseJsonPrompt(std::string json_str, SDParams* params) {
12541254
if (params->lastRequest.mask_image.data) {
12551255
free(params->lastRequest.mask_image.data);
12561256
}
1257-
params->lastRequest.mask_image = sd_image_t{(uint32_t)width, (uint32_t)height, (uint32_t)c, image_buffer};
1257+
params->lastRequest.mask_image = sd_image_t{(uint32_t)width, (uint32_t)height, 1, image_buffer};
12581258
sd_log(sd_log_level_t::SD_LOG_INFO, "Loaded image from memory: %dx%d, %d channels\n", width, height, c);
12591259
return true;
12601260
}},
@@ -1743,11 +1743,6 @@ bool parseJsonPrompt(std::string json_str, SDParams* params) {
17431743
}
17441744
} catch (...) {
17451745
}
1746-
try {
1747-
int interval = payload["preview_interval"];
1748-
params->lastRequest.preview_interval = interval;
1749-
} catch (...) {
1750-
}
17511746

17521747
// ctxParams zone
17531748

0 commit comments

Comments
 (0)