Skip to content

Commit ea9a1a3

Browse files
committed
fix sd_ctx leak
1 parent c75db33 commit ea9a1a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ bool is_model_file(const std::string& path) {
16671667
return (file_extension == "gguf" || file_extension == "safetensors" || file_extension == "sft" || file_extension == "ckpt");
16681668
}
16691669

1670-
nlohmann::json serv_generate_image(sd_ctx_t* sd_ctx, SDParams& params, int& n_prompts, const httplib::Request& req) {
1670+
nlohmann::json serv_generate_image(sd_ctx_t* &sd_ctx, SDParams& params, int& n_prompts, const httplib::Request& req) {
16711671
using json = nlohmann::json;
16721672
std::string task_id = std::to_string(std::chrono::system_clock::now().time_since_epoch().count());
16731673

0 commit comments

Comments
 (0)