mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2025-12-12 13:28:37 +00:00
fix: correct preview method selection (#1038)
This commit is contained in:
parent
bcc9c0d0b3
commit
118683de8a
@ -409,18 +409,18 @@ struct SDCliParams {
|
||||
return -1;
|
||||
}
|
||||
const char* preview = argv[index];
|
||||
int preview_method = -1;
|
||||
int preview_found = -1;
|
||||
for (int m = 0; m < PREVIEW_COUNT; m++) {
|
||||
if (!strcmp(preview, previews_str[m])) {
|
||||
preview_method = m;
|
||||
preview_found = m;
|
||||
}
|
||||
}
|
||||
if (preview_method == -1) {
|
||||
if (preview_found == -1) {
|
||||
fprintf(stderr, "error: preview method %s\n",
|
||||
preview);
|
||||
return -1;
|
||||
}
|
||||
preview_method = (preview_t)preview_method;
|
||||
preview_method = (preview_t)preview_found;
|
||||
return 1;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user