diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index 417d211..22480d7 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -232,7 +232,7 @@ static std::string sd_basename(const std::string& path) { } std::string get_image_params(const SDCliParams& cli_params, const SDContextParams& ctx_params, const SDGenerationParams& gen_params, int64_t seed) { - std::string parameter_string = gen_params.prompt + "\n"; + std::string parameter_string = gen_params.prompt_with_lora + "\n"; if (gen_params.negative_prompt.size() != 0) { parameter_string += "Negative prompt: " + gen_params.negative_prompt + "\n"; } diff --git a/examples/common/common.hpp b/examples/common/common.hpp index ccd01ce..bf38379 100644 --- a/examples/common/common.hpp +++ b/examples/common/common.hpp @@ -863,6 +863,7 @@ static bool is_absolute_path(const std::string& p) { struct SDGenerationParams { std::string prompt; + std::string prompt_with_lora; // for metadata record only std::string negative_prompt; int clip_skip = -1; // <= 0 represents unspecified int width = 512; @@ -1476,6 +1477,7 @@ struct SDGenerationParams { } bool process_and_check(SDMode mode, const std::string& lora_model_dir) { + prompt_with_lora = prompt; if (width <= 0) { fprintf(stderr, "error: the width must be greater than 0\n"); return false;