Skip to content

Commit 653125e

Browse files
committed
Send the ref images received by the API to the image generator
1 parent df89bf6 commit 653125e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/server.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ crow::response Server::generateImage(const crow::json::rvalue& json_body, bool i
307307
params.strength = json_body.has("denoising_strength") ? json_body["denoising_strength"].d() : 0.75f;
308308
}
309309

310+
// reference images
311+
if (json_body.has("ref_images") && json_body["ref_images"].size() > 0) {
312+
for (size_t i = 0; i < json_body["ref_images"].size(); i++) {
313+
params.ref_images_base64.push_back(std::string(json_body["ref_images"][i].s()));
314+
}
315+
}
316+
310317
// ControlNet parameters from alwayson_scripts
311318
if (json_body.has("alwayson_scripts") && json_body["alwayson_scripts"].has("controlnet")) {
312319
auto controlnet_obj = json_body["alwayson_scripts"]["controlnet"];

0 commit comments

Comments
 (0)