@@ -888,13 +888,13 @@ bool parseJsonPrompt(std::string json_str, SDParams* params) {
888888 }
889889 try {
890890 bool vae_tiling = payload[" vae_tiling" ];
891- printf (" VAE_tiling : %s" , vae_tiling ? " true" : " false" );
892891 if (params->ctxParams .vae_tiling != vae_tiling) {
893892 params->ctxParams .vae_tiling = vae_tiling;
894893 updatectx = true ;
895894 }
896895 } catch (...) {
897896 }
897+
898898 try {
899899 std::string model = payload[" model" ];
900900 if (params->ctxParams .model_path != params->models_dir + model) {
@@ -957,7 +957,7 @@ bool parseJsonPrompt(std::string json_str, SDParams* params) {
957957 try {
958958 std::string schedule = payload[" schedule" ];
959959 int schedule_found = -1 ;
960- for (int m = 0 ; m < N_SAMPLE_METHODS ; m++) {
960+ for (int m = 0 ; m < N_SCHEDULES ; m++) {
961961 if (!strcmp (schedule.c_str (), schedule_str[m])) {
962962 schedule_found = m;
963963 }
@@ -1009,8 +1009,8 @@ void worker_thread() {
10091009 queue_cond.wait (lock, [] { return !task_queue.empty () || stop_worker; });
10101010
10111011 if (!task_queue.empty ()) {
1012- is_busy = true ;
1013- auto task = task_queue.front ();
1012+ is_busy = true ;
1013+ auto task = task_queue.front ();
10141014 task_queue.pop ();
10151015 lock.unlock ();
10161016 task ();
@@ -1080,7 +1080,7 @@ void start_server(SDParams params) {
10801080 bool updateCTX = false ;
10811081 try {
10821082 std::string json_str = req.body ;
1083- updateCTX = parseJsonPrompt (json_str, ¶ms);
1083+ updateCTX = parseJsonPrompt (json_str, ¶ms);
10841084 } catch (json::parse_error& e) {
10851085 // assume the request is just a prompt
10861086 // LOG_WARN("Failed to parse json: %s\n Assuming it's just a prompt...\n", e.what());
@@ -1105,6 +1105,7 @@ void start_server(SDParams params) {
11051105 }
11061106
11071107 if (sd_ctx == NULL ) {
1108+ printf (" Loading sd_ctx\n " );
11081109 json task_json = json::object ();
11091110 task_json[" status" ] = " Loading" ;
11101111 task_json[" data" ] = json::array ();
0 commit comments