Skip to content

Commit d6825bb

Browse files
committed
fix: add missing edit mode to help text
1 parent f5d7c03 commit d6825bb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/cli/main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const char* modes_str[] = {
6060
"edit",
6161
"convert",
6262
};
63+
#define SD_ALL_MODES_STR "txt2img, img2img, img2vid, edit, convert"
6364

6465
enum SDMode {
6566
TXT2IMG,
@@ -199,7 +200,8 @@ void print_usage(int argc, const char* argv[]) {
199200
printf("\n");
200201
printf("arguments:\n");
201202
printf(" -h, --help show this help message and exit\n");
202-
printf(" -M, --mode [MODEL] run mode (txt2img or img2img or convert, default: txt2img)\n");
203+
printf(" -M, --mode {%s}\n", SD_ALL_MODES_STR);
204+
printf(" run mode (default: txt2img)\n");
203205
printf(" -t, --threads N number of threads to use during computation (default: -1)\n");
204206
printf(" If threads <= 0, then threads will be set to the number of CPU physical cores\n");
205207
printf(" -m, --model [MODEL] path to full model\n");
@@ -291,8 +293,8 @@ void parse_args(int argc, const char** argv, SDParams& params) {
291293
}
292294
if (mode_found == -1) {
293295
fprintf(stderr,
294-
"error: invalid mode %s, must be one of [txt2img, img2img, img2vid, convert]\n",
295-
mode_selected);
296+
"error: invalid mode %s, must be one of [%s]\n",
297+
mode_selected, SD_ALL_MODES_STR);
296298
exit(1);
297299
}
298300
params.mode = (SDMode)mode_found;

0 commit comments

Comments
 (0)