Skip to content

Commit 0661226

Browse files
committed
Remove default variables in c code
1 parent c3eeb66 commit 0661226

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

examples/cli/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,11 @@ int main(int argc, const char* argv[]) {
991991
params.control_strength,
992992
params.style_ratio,
993993
params.normalize_input,
994-
params.input_id_images_path.c_str());
994+
params.input_id_images_path.c_str(),
995+
params.skip_layers,
996+
params.slg_scale,
997+
params.skip_layer_start,
998+
params.skip_layer_end);
995999
}
9961000
}
9971001

stable-diffusion.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,10 +1453,10 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
14531453
float style_ratio,
14541454
bool normalize_input,
14551455
const char* input_id_images_path_c_str,
1456-
std::vector<int> skip_layers,
1457-
float slg_scale,
1458-
float skip_layer_start,
1459-
float skip_layer_end) {
1456+
std::vector<int> skip_layers = {},
1457+
float slg_scale = 2.5,
1458+
float skip_layer_start = 0.01,
1459+
float skip_layer_end = 0.2) {
14601460
LOG_DEBUG("txt2img %dx%d", width, height);
14611461
if (sd_ctx == NULL) {
14621462
return NULL;
@@ -1556,10 +1556,10 @@ sd_image_t* img2img(sd_ctx_t* sd_ctx,
15561556
float style_ratio,
15571557
bool normalize_input,
15581558
const char* input_id_images_path_c_str,
1559-
std::vector<int> skip_layers,
1560-
float slg_scale,
1561-
float skip_layer_start,
1562-
float skip_layer_end) {
1559+
std::vector<int> skip_layers = {},
1560+
float slg_scale = 2.5,
1561+
float skip_layer_start = 0.01,
1562+
float skip_layer_end = 0.2) {
15631563
LOG_DEBUG("img2img %dx%d", width, height);
15641564
if (sd_ctx == NULL) {
15651565
return NULL;

stable-diffusion.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ SD_API sd_image_t* txt2img(sd_ctx_t* sd_ctx,
166166
float style_strength,
167167
bool normalize_input,
168168
const char* input_id_images_path,
169-
std::vector<int> skip_layers = {},
170-
float slg_scale = 2.5,
171-
float skip_layer_start = 0.01,
172-
float skip_layer_end = 0.2);
169+
std::vector<int> skip_layers,
170+
float slg_scale,
171+
float skip_layer_start,
172+
float skip_layer_end);
173173

174174
SD_API sd_image_t* img2img(sd_ctx_t* sd_ctx,
175175
sd_image_t init_image,
@@ -190,10 +190,10 @@ SD_API sd_image_t* img2img(sd_ctx_t* sd_ctx,
190190
float style_strength,
191191
bool normalize_input,
192192
const char* input_id_images_path,
193-
std::vector<int> skip_layers = {},
194-
float slg_scale = 2.5,
195-
float skip_layer_start = 0.01,
196-
float skip_layer_end = 0.2);
193+
std::vector<int> skip_layers,
194+
float slg_scale,
195+
float skip_layer_start,
196+
float skip_layer_end);
197197

198198
SD_API sd_image_t* img2vid(sd_ctx_t* sd_ctx,
199199
sd_image_t init_image,

0 commit comments

Comments
 (0)