fix: fix a few typos on cli help and error messages (#714)

This commit is contained in:
Wagner Bruna 2025-07-04 11:15:41 -03:00 committed by GitHub
parent 3bae667f3d
commit 76c72628b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 7 deletions

View File

@ -181,7 +181,7 @@ struct AYSSchedule : SigmaSchedule {
LOG_INFO("AYS using SVD noise levels"); LOG_INFO("AYS using SVD noise levels");
inputs = noise_levels[2]; inputs = noise_levels[2];
} else { } else {
LOG_ERROR("Version not compatable with AYS scheduler"); LOG_ERROR("Version not compatible with AYS scheduler");
return results; return results;
} }

View File

@ -60,6 +60,7 @@ const char* modes_str[] = {
"edit", "edit",
"convert", "convert",
}; };
#define SD_ALL_MODES_STR "txt2img, img2img, edit, convert"
enum SDMode { enum SDMode {
TXT2IMG, TXT2IMG,
@ -199,14 +200,18 @@ void print_usage(int argc, const char* argv[]) {
printf("\n"); printf("\n");
printf("arguments:\n"); printf("arguments:\n");
printf(" -h, --help show this help message and exit\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(" -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(" 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"); printf(" -m, --model [MODEL] path to full model\n");
printf(" --diffusion-model path to the standalone diffusion model\n"); printf(" --diffusion-model path to the standalone diffusion model\n");
printf(" --clip_l path to the clip-l text encoder\n"); printf(" --clip_l path to the clip-l text encoder\n");
printf(" --clip_g path to the clip-g 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(" --vae [VAE] path to vae\n");
printf(" --taesd [TAESD_PATH] path to taesd. Using Tiny AutoEncoder for fast decoding (low quality)\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"); printf(" --control-net [CONTROL_PATH] path to control net model\n");
@ -222,7 +227,7 @@ void print_usage(int argc, const char* argv[]) {
printf(" -i, --init-img [IMAGE] path to the input image, required by img2img\n"); 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(" --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(" --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(" -o, --output OUTPUT path to write result image to (default: ./output.png)\n");
printf(" -p, --prompt [PROMPT] the prompt to render\n"); printf(" -p, --prompt [PROMPT] the prompt to render\n");
printf(" -n, --negative-prompt PROMPT the negative prompt (default: \"\")\n"); printf(" -n, --negative-prompt PROMPT the negative prompt (default: \"\")\n");
@ -291,8 +296,8 @@ void parse_args(int argc, const char** argv, SDParams& params) {
} }
if (mode_found == -1) { if (mode_found == -1) {
fprintf(stderr, fprintf(stderr,
"error: invalid mode %s, must be one of [txt2img, img2img, img2vid, convert]\n", "error: invalid mode %s, must be one of [%s]\n",
mode_selected); mode_selected, SD_ALL_MODES_STR);
exit(1); exit(1);
} }
params.mode = (SDMode)mode_found; params.mode = (SDMode)mode_found;
@ -1218,4 +1223,4 @@ int main(int argc, const char* argv[]) {
free(input_image_buffer); free(input_image_buffer);
return 0; return 0;
} }