Skip to content

Commit e5567a6

Browse files
committed
warn if version doesn't support slg
1 parent f6e9df9 commit e5567a6

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
@@ -799,7 +799,12 @@ class StableDiffusionGGML {
799799
out_uncond = ggml_dup_tensor(work_ctx, x);
800800
}
801801
if (has_skiplayer) {
802-
out_skip = ggml_dup_tensor(work_ctx, x);
802+
if (version == VERSION_SD3_2B || version == VERSION_SD3_5_2B || version == VERSION_SD3_5_8B || version == VERSION_FLUX_DEV || version == VERSION_FLUX_SCHNELL) {
803+
out_skip = ggml_dup_tensor(work_ctx, x);
804+
} else {
805+
has_skiplayer = false;
806+
LOG_WARN("SLG is incompatible with %s models", model_version_to_str[version]);
807+
}
803808
}
804809
struct ggml_tensor* denoised = ggml_dup_tensor(work_ctx, x);
805810

0 commit comments

Comments
 (0)