fix a few typos on cli help and error messages#714
Conversation
| 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 {%s}\n", SD_ALL_MODES_STR); |
There was a problem hiding this comment.
god yes, this has bothered me at a couple of occasions, but I always forget it again.
|
I think it would be better to keep the description of the --mode arguement. |
You mean on the same line and keeping diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp
index 23166df..18be80b 100644
--- a/examples/cli/main.cpp
+++ b/examples/cli/main.cpp
@@ -200,8 +200,7 @@ 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 {%s}\n", SD_ALL_MODES_STR);
- printf(" run mode (default: txt2img)\n");
+ printf(" -M, --mode [MODE] run mode (one of %s; default: txt2img)\n", SD_ALL_MODES_STR);
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");I was trying to follow the other multi-choice options pattern, because that line is getting rather long (but no strong feelings about it). |
|
We could also add full descriptions instead: diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp
index 23166df..ec8401b 100644
--- a/examples/cli/main.cpp
+++ b/examples/cli/main.cpp
@@ -200,8 +200,12 @@ 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 {%s}\n", SD_ALL_MODES_STR);
- printf(" run mode (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(" img2vid: generate a video 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");(I can update the PR, but feel free to change it directly if you wish) |
Please update the pr. |
|
I added the detailed descriptions of the modes to the help text. BTW, I've also noticed the 'SVD support is broken' message, so I'm not mentioning img2vid on the text. |
|
Thank you for your contribution. |
Not sure if it'd be better to build a dynamic string for the mode list.