Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,18 @@ void parse_args(int argc, const char** argv, SDSvrParams& svr_params, SDContextP
exit(svr_params.normal_exit ? 0 : 1);
}

const bool random_seed_requested = default_gen_params.seed < 0;

if (!svr_params.process_and_check() ||
!ctx_params.process_and_check(IMG_GEN) ||
!default_gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) {
print_usage(argc, argv, options_vec);
exit(1);
}

if (random_seed_requested) {
default_gen_params.seed = -1;
}
}

std::string extract_and_remove_sd_cpp_extra_args(std::string& text) {
Expand Down