This commit is contained in:
Vladimir Mandic
2024-07-02 11:28:14 -04:00
parent 35f74fa0fe
commit 2cac5f365d
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -389,7 +389,7 @@ def get_weighted_text_embeddings(pipe, prompt: str = "", neg_prompt: str = "", c
except Exception:
pooled_prompt_embeds = None
negative_pooled_prompt_embeds = None
debug(f'Prompt: pooled shape={pooled_prompt_embeds[0].shape} time={(time.time() - t0):.3f}')
debug(f'Prompt: pooled shape={pooled_prompt_embeds[0].shape if pooled_prompt_embeds is not None else None} time={(time.time() - t0):.3f}')
prompt_embeds = torch.cat(prompt_embeds, dim=-1) if len(prompt_embeds) > 1 else prompt_embeds[0]
negative_prompt_embeds = torch.cat(negative_prompt_embeds, dim=-1) if len(negative_prompt_embeds) > 1 else \