Skip to content

fix: allow resetting clip_skip to its default value #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wbruna
Copy link

@wbruna wbruna commented May 30, 2025

CLIPTextModel currently ignores attempts to set clip_skip back to -1, retaining the previously set value instead. While this is not an issue to the sd command (which does not support changing clip_skip between generations), it affects frontends that reuse model instances for multiple images.

Since each model version's default clip_skip value is defined by its respective Conditioner class, it needs to be applied every time they get a different clip_skip value, so move that logic from their constructors into their set_clip_skip methods.

Related: LostRuins/koboldcpp#1546

(the original PR #687 was closed because I submitted it on the master branch by mistake)

CLIPTextModel currently ignores attempts to set clip_skip back to
-1, retaining the previously set value instead. While this is not
an issue to the sd command (which does not support changing
clip_skip between generations), it affects frontends that reuse
model instances for multiple images.

Since each model version's default clip_skip value is defined by
its respective Conditioner class, it needs to be applied every time
they get a different clip_skip value, so move that logic from their
constructors into their set_clip_skip methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant