Skip to content

Commit bcc8880

Browse files
committed
warn if version doesn't support slg
1 parent 4fe0e82 commit bcc8880

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stable-diffusion.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,12 @@ class StableDiffusionGGML {
811811
out_uncond = ggml_dup_tensor(tmp_ctx, x);
812812
}
813813
if (has_skiplayer) {
814-
out_skip = ggml_dup_tensor(tmp_ctx, x);
814+
if (version == VERSION_SD3_2B || version == VERSION_SD3_5_2B || version == VERSION_SD3_5_8B || version == VERSION_FLUX_DEV || version == VERSION_FLUX_SCHNELL) {
815+
out_skip = ggml_dup_tensor(tmp_ctx, x);
816+
} else {
817+
has_skiplayer = false;
818+
LOG_WARN("SLG is incompatible with %s models", model_version_to_str[version]);
819+
}
815820
}
816821
struct ggml_tensor* denoised = ggml_dup_tensor(tmp_ctx, x);
817822

0 commit comments

Comments
 (0)