Spaces:
Sleeping
Sleeping
Update clip_slider_pipeline.py
Browse files- clip_slider_pipeline.py +3 -2
clip_slider_pipeline.py
CHANGED
@@ -239,11 +239,12 @@ class CLIPSliderXL(CLIPSlider):
|
|
239 |
toks.to(text_encoder.device),
|
240 |
output_hidden_states=True,
|
241 |
)
|
242 |
-
|
243 |
# We are only ALWAYS interested in the pooled output of the final text encoder
|
244 |
pooled_prompt_embeds = prompt_embeds[0]
|
|
|
245 |
prompt_embeds = prompt_embeds.hidden_states[-2]
|
246 |
-
|
247 |
if avg_diff_2nd and normalize_scales:
|
248 |
denominator = abs(scale) + abs(scale_2nd)
|
249 |
scale = scale / denominator
|
|
|
239 |
toks.to(text_encoder.device),
|
240 |
output_hidden_states=True,
|
241 |
)
|
242 |
+
|
243 |
# We are only ALWAYS interested in the pooled output of the final text encoder
|
244 |
pooled_prompt_embeds = prompt_embeds[0]
|
245 |
+
|
246 |
prompt_embeds = prompt_embeds.hidden_states[-2]
|
247 |
+
print("prompt_embeds.dtype",prompt_embeds.dtype)
|
248 |
if avg_diff_2nd and normalize_scales:
|
249 |
denominator = abs(scale) + abs(scale_2nd)
|
250 |
scale = scale / denominator
|