Add option to enable clip skip for clip L on SDXL

This commit is contained in:
Silver
2024-06-10 22:11:11 +02:00
parent 123582b00f
commit 00e09382cd
2 changed files with 3 additions and 0 deletions

View File

@@ -355,6 +355,8 @@ class FrozenCLIPEmbedderForSDXLWithCustomWords(FrozenCLIPEmbedderWithCustomWords
if self.wrapped.layer == "last":
z = outputs.last_hidden_state
elif opts.sdxl_clip_l_skip is True:
z = outputs.hidden_states[-opts.CLIP_stop_at_last_layers]
else:
z = outputs.hidden_states[self.wrapped.layer_idx]