Skip to content

Commit 5725373

Browse files
committed
fix: allow changing clip_skip back to its default value
CLIPTextModel ignored setting clip_skip back to -1, instead retaining whatever value was previously defined. This is not relevant to command-line sd, since it's currently not possible to change clip_skip between generations, but could affect any frontend that reuses model instances for multiple images.
1 parent 10c6501 commit 5725373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clip.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ class CLIPTextModel : public GGMLBlock {
701701

702702
void set_clip_skip(int skip) {
703703
if (skip <= 0) {
704-
return;
704+
skip = -1;
705705
}
706706
clip_skip = skip;
707707
}

0 commit comments

Comments
 (0)