chore: add .clang-format
This commit is contained in:
parent
64f6002457
commit
176a00b606
13
.clang-format
Normal file
13
.clang-format
Normal file
@ -0,0 +1,13 @@
|
||||
BasedOnStyle: Chromium
|
||||
UseTab: Never
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
IndentCaseLabels: false
|
||||
ColumnLimit: 0
|
||||
AccessModifierOffset: -4
|
||||
NamespaceIndentation: All
|
||||
FixNamespaceComments: false
|
||||
AlignAfterOpenBracket: true
|
||||
AlignConsecutiveAssignments: true
|
||||
IndentCaseLabels: true
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ test/
|
||||
|
||||
.cache/
|
||||
*.swp
|
||||
.vscode/
|
||||
|
@ -88,8 +88,7 @@ const char* sample_method_str[] = {
|
||||
const char* schedule_str[] = {
|
||||
"default",
|
||||
"discrete",
|
||||
"karras"
|
||||
};
|
||||
"karras"};
|
||||
|
||||
struct Option {
|
||||
int n_threads = -1;
|
||||
@ -129,7 +128,7 @@ struct Option {
|
||||
printf(" sample_steps: %d\n", sample_steps);
|
||||
printf(" strength: %.2f\n", strength);
|
||||
printf(" rng: %s\n", rng_type_to_str[rng_type]);
|
||||
printf(" seed: %lld\n", seed);
|
||||
printf(" seed: %ld\n", seed);
|
||||
}
|
||||
};
|
||||
|
||||
@ -405,6 +404,7 @@ int main(int argc, const char* argv[]) {
|
||||
vae_decode_only = false;
|
||||
|
||||
int c = 0;
|
||||
|
||||
unsigned char* img_data = stbi_load(opt.init_img.c_str(), &opt.w, &opt.h, &c, 3);
|
||||
if (img_data == NULL) {
|
||||
fprintf(stderr, "load image from '%s' failed\n", opt.init_img.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user