-
Notifications
You must be signed in to change notification settings - Fork 393
fix a few typos on cli help and error messages #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
examples/cli/main.cpp
Outdated
@@ -199,14 +200,15 @@ 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 {%s}\n", SD_ALL_MODES_STR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.