Skip to content

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

Merged
merged 3 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion denoiser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ struct AYSSchedule : SigmaSchedule {
LOG_INFO("AYS using SVD noise levels");
inputs = noise_levels[2];
} else {
LOG_ERROR("Version not compatable with AYS scheduler");
LOG_ERROR("Version not compatible with AYS scheduler");
return results;
}

Expand Down
17 changes: 11 additions & 6 deletions examples/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const char* modes_str[] = {
"edit",
"convert",
};
#define SD_ALL_MODES_STR "txt2img, img2img, edit, convert"

enum SDMode {
TXT2IMG,
Expand Down Expand Up @@ -199,14 +200,18 @@ 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 [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(" 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(" --diffusion-model path to the standalone diffusion model\n");
printf(" --clip_l path to the clip-l 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(" --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");
Expand All @@ -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(" --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(" -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(" -p, --prompt [PROMPT] the prompt to render\n");
printf(" -n, --negative-prompt PROMPT the negative prompt (default: \"\")\n");
Expand Down Expand Up @@ -291,8 +296,8 @@ void parse_args(int argc, const char** argv, SDParams& params) {
}
if (mode_found == -1) {
fprintf(stderr,
"error: invalid mode %s, must be one of [txt2img, img2img, img2vid, convert]\n",
mode_selected);
"error: invalid mode %s, must be one of [%s]\n",
mode_selected, SD_ALL_MODES_STR);
exit(1);
}
params.mode = (SDMode)mode_found;
Expand Down Expand Up @@ -1218,4 +1223,4 @@ int main(int argc, const char* argv[]) {
free(input_image_buffer);

return 0;
}
}
Loading