Skip to content

Commit 76c7262

Browse files
authored
fix: fix a few typos on cli help and error messages (leejet#714)
1 parent 3bae667 commit 76c7262

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

denoiser.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ struct AYSSchedule : SigmaSchedule {
181181
LOG_INFO("AYS using SVD noise levels");
182182
inputs = noise_levels[2];
183183
} else {
184-
LOG_ERROR("Version not compatable with AYS scheduler");
184+
LOG_ERROR("Version not compatible with AYS scheduler");
185185
return results;
186186
}
187187

examples/cli/main.cpp

Lines changed: 11 additions & 6 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, edit, convert"
6364

6465
enum SDMode {
6566
TXT2IMG,
@@ -199,14 +200,18 @@ 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 [MODE] run mode, one of:\n");
204+
printf(" txt2img: generate an image from a text prompt (default)\n");
205+
printf(" img2img: generate an image from a text prompt and an initial image (--init-img)\n");
206+
printf(" edit: modify an image (--ref-image) based on text instructions\n");
207+
printf(" convert: convert a model file to gguf format, optionally with quantization\n");
203208
printf(" -t, --threads N number of threads to use during computation (default: -1)\n");
204209
printf(" If threads <= 0, then threads will be set to the number of CPU physical cores\n");
205210
printf(" -m, --model [MODEL] path to full model\n");
206211
printf(" --diffusion-model path to the standalone diffusion model\n");
207212
printf(" --clip_l path to the clip-l text encoder\n");
208213
printf(" --clip_g path to the clip-g text encoder\n");
209-
printf(" --t5xxl path to the the t5xxl text encoder\n");
214+
printf(" --t5xxl path to the t5xxl text encoder\n");
210215
printf(" --vae [VAE] path to vae\n");
211216
printf(" --taesd [TAESD_PATH] path to taesd. Using Tiny AutoEncoder for fast decoding (low quality)\n");
212217
printf(" --control-net [CONTROL_PATH] path to control net model\n");
@@ -222,7 +227,7 @@ void print_usage(int argc, const char* argv[]) {
222227
printf(" -i, --init-img [IMAGE] path to the input image, required by img2img\n");
223228
printf(" --mask [MASK] path to the mask image, required by img2img with mask\n");
224229
printf(" --control-image [IMAGE] path to image condition, control net\n");
225-
printf(" -r, --ref_image [PATH] reference image for Flux Kontext models (can be used multiple times) \n");
230+
printf(" -r, --ref-image [PATH] reference image for Flux Kontext models (can be used multiple times) \n");
226231
printf(" -o, --output OUTPUT path to write result image to (default: ./output.png)\n");
227232
printf(" -p, --prompt [PROMPT] the prompt to render\n");
228233
printf(" -n, --negative-prompt PROMPT the negative prompt (default: \"\")\n");
@@ -291,8 +296,8 @@ void parse_args(int argc, const char** argv, SDParams& params) {
291296
}
292297
if (mode_found == -1) {
293298
fprintf(stderr,
294-
"error: invalid mode %s, must be one of [txt2img, img2img, img2vid, convert]\n",
295-
mode_selected);
299+
"error: invalid mode %s, must be one of [%s]\n",
300+
mode_selected, SD_ALL_MODES_STR);
296301
exit(1);
297302
}
298303
params.mode = (SDMode)mode_found;
@@ -1218,4 +1223,4 @@ int main(int argc, const char* argv[]) {
12181223
free(input_image_buffer);
12191224

12201225
return 0;
1221-
}
1226+
}

0 commit comments

Comments
 (0)