@@ -780,7 +780,7 @@ class StableDiffusionGGML {
780780 int start_merge_step,
781781 SDCondition id_cond,
782782 std::vector<int > skip_layers = {},
783- float slg_scale = 2.5 ,
783+ float slg_scale = 0 ,
784784 float skip_layer_start = 0.01 ,
785785 float skip_layer_end = 0.2 ) {
786786 size_t steps = sigmas.size () - 1 ;
@@ -1162,7 +1162,7 @@ sd_image_t* generate_image(sd_ctx_t* sd_ctx,
11621162 bool normalize_input,
11631163 std::string input_id_images_path,
11641164 std::vector<int > skip_layers = {},
1165- float slg_scale = 2.5 ,
1165+ float slg_scale = 0 ,
11661166 float skip_layer_start = 0.01 ,
11671167 float skip_layer_end = 0.2 ) {
11681168 if (seed < 0 ) {
@@ -1453,10 +1453,12 @@ 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+ int * skip_layers = NULL ,
1457+ size_t skip_layers_count = 0 ,
1458+ float slg_scale = 0 ,
1459+ float skip_layer_start = 0.01 ,
1460+ float skip_layer_end = 0.2 ) {
1461+ std::vector<int > skip_layers_vec (skip_layers, skip_layers + skip_layers_count);
14601462 LOG_DEBUG (" txt2img %dx%d" , width, height);
14611463 if (sd_ctx == NULL ) {
14621464 return NULL ;
@@ -1525,7 +1527,7 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
15251527 style_ratio,
15261528 normalize_input,
15271529 input_id_images_path_c_str,
1528- skip_layers ,
1530+ skip_layers_vec ,
15291531 slg_scale,
15301532 skip_layer_start,
15311533 skip_layer_end);
@@ -1556,10 +1558,12 @@ sd_image_t* img2img(sd_ctx_t* sd_ctx,
15561558 float style_ratio,
15571559 bool normalize_input,
15581560 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) {
1561+ int * skip_layers = NULL ,
1562+ size_t skip_layers_count = 0 ,
1563+ float slg_scale = 0 ,
1564+ float skip_layer_start = 0.01 ,
1565+ float skip_layer_end = 0.2 ) {
1566+ std::vector<int > skip_layers_vec (skip_layers, skip_layers + skip_layers_count);
15631567 LOG_DEBUG (" img2img %dx%d" , width, height);
15641568 if (sd_ctx == NULL ) {
15651569 return NULL ;
@@ -1634,7 +1638,7 @@ sd_image_t* img2img(sd_ctx_t* sd_ctx,
16341638 style_ratio,
16351639 normalize_input,
16361640 input_id_images_path_c_str,
1637- skip_layers ,
1641+ skip_layers_vec ,
16381642 slg_scale,
16391643 skip_layer_start,
16401644 skip_layer_end);
0 commit comments