From 6e85825b0d3a0bb4a190057cbafc3c47a2ab3747 Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Tue, 1 Jul 2025 18:29:09 -0300 Subject: [PATCH 1/3] fix: a few typos in the command line help text --- examples/cli/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index d0604044..5c151658 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -206,7 +206,7 @@ void print_usage(int argc, const char* argv[]) { printf(" --diffusion-model path to the standalone diffusion model\n"); printf(" --clip_l path to the clip-l text encoder\n"); printf(" --clip_g path to the clip-g text encoder\n"); - printf(" --t5xxl path to the the t5xxl text encoder\n"); + printf(" --t5xxl path to the t5xxl text encoder\n"); printf(" --vae [VAE] path to vae\n"); printf(" --taesd [TAESD_PATH] path to taesd. Using Tiny AutoEncoder for fast decoding (low quality)\n"); printf(" --control-net [CONTROL_PATH] path to control net model\n"); @@ -222,7 +222,7 @@ void print_usage(int argc, const char* argv[]) { printf(" -i, --init-img [IMAGE] path to the input image, required by img2img\n"); printf(" --mask [MASK] path to the mask image, required by img2img with mask\n"); printf(" --control-image [IMAGE] path to image condition, control net\n"); - printf(" -r, --ref_image [PATH] reference image for Flux Kontext models (can be used multiple times) \n"); + printf(" -r, --ref-image [PATH] reference image for Flux Kontext models (can be used multiple times) \n"); printf(" -o, --output OUTPUT path to write result image to (default: ./output.png)\n"); printf(" -p, --prompt [PROMPT] the prompt to render\n"); printf(" -n, --negative-prompt PROMPT the negative prompt (default: \"\")\n"); From cca2e4ecb8f79273c97aeba110ef9cc24e073e47 Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Tue, 1 Jul 2025 19:10:08 -0300 Subject: [PATCH 2/3] fix: typo in denoiser error message --- denoiser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/denoiser.hpp b/denoiser.hpp index 2bd0b939..d4bcec59 100644 --- a/denoiser.hpp +++ b/denoiser.hpp @@ -181,7 +181,7 @@ struct AYSSchedule : SigmaSchedule { LOG_INFO("AYS using SVD noise levels"); inputs = noise_levels[2]; } else { - LOG_ERROR("Version not compatable with AYS scheduler"); + LOG_ERROR("Version not compatible with AYS scheduler"); return results; } From 39dad6d92a62757a94e7e28ba826fd5bf9e0dd5c Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Thu, 3 Jul 2025 12:06:01 -0300 Subject: [PATCH 3/3] fix: improve mode help text, add missing edit mode --- examples/cli/main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index 5c151658..730a4941 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -60,6 +60,7 @@ const char* modes_str[] = { "edit", "convert", }; +#define SD_ALL_MODES_STR "txt2img, img2img, edit, convert" enum SDMode { TXT2IMG, @@ -199,7 +200,11 @@ void print_usage(int argc, const char* argv[]) { printf("\n"); printf("arguments:\n"); printf(" -h, --help show this help message and exit\n"); - printf(" -M, --mode [MODEL] run mode (txt2img or img2img or convert, default: txt2img)\n"); + printf(" -M, --mode [MODE] run mode, one of:\n"); + printf(" txt2img: generate an image from a text prompt (default)\n"); + printf(" img2img: generate an image from a text prompt and an initial image (--init-img)\n"); + printf(" edit: modify an image (--ref-image) based on text instructions\n"); + printf(" convert: convert a model file to gguf format, optionally with quantization\n"); printf(" -t, --threads N number of threads to use during computation (default: -1)\n"); printf(" If threads <= 0, then threads will be set to the number of CPU physical cores\n"); printf(" -m, --model [MODEL] path to full model\n"); @@ -291,8 +296,8 @@ void parse_args(int argc, const char** argv, SDParams& params) { } if (mode_found == -1) { fprintf(stderr, - "error: invalid mode %s, must be one of [txt2img, img2img, img2vid, convert]\n", - mode_selected); + "error: invalid mode %s, must be one of [%s]\n", + mode_selected, SD_ALL_MODES_STR); exit(1); } params.mode = (SDMode)mode_found; @@ -1218,4 +1223,4 @@ int main(int argc, const char* argv[]) { free(input_image_buffer); return 0; -} \ No newline at end of file +}