Skip to content

Commit 8577446

Browse files
committed
ignore slg if slg_scale is zero (optimization)
1 parent bd9b0f1 commit 8577446

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ class StableDiffusionGGML {
877877
negative_data = (float*)out_uncond->data;
878878
}
879879

880-
bool has_skiplayer = skip_layers.size() > 0;
880+
bool has_skiplayer = skip_layers.size() > 0 && slg_scale != 0.0;
881881
int stepCount = sigmas.size();
882882
has_skiplayer = has_skiplayer && step > (int)(skip_layer_start * stepCount) && step < (int)(skip_layer_end * stepCount);
883883
float* skip_layer_data = NULL;

0 commit comments

Comments
 (0)