Skip to content

Conversation

@wbruna
Copy link
Contributor

@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.
@leejet
Copy link
Owner

leejet commented Jun 30, 2025

Thank you for your contribution.

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.

2 participants