mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-10 18:05:16 +00:00
Make CLIP set last layer node work with t5 models.
This commit is contained in:
parent
6579632201
commit
e2fafe0686
@ -209,6 +209,11 @@ class T5Stack(torch.nn.Module):
|
||||
intermediate = None
|
||||
optimized_attention = optimized_attention_for_device(x.device, mask=attention_mask is not None, small_input=True)
|
||||
past_bias = None
|
||||
|
||||
if intermediate_output is not None:
|
||||
if intermediate_output < 0:
|
||||
intermediate_output = len(self.block) + intermediate_output
|
||||
|
||||
for i, l in enumerate(self.block):
|
||||
x, past_bias = l(x, mask, past_bias, optimized_attention)
|
||||
if i == intermediate_output:
|
||||
|
Loading…
Reference in New Issue
Block a user