fix refiner reload/unload

This commit is contained in:
Vladimir Mandic
2023-08-26 13:35:59 +00:00
parent d48a13a118
commit c4263da0e6
7 changed files with 84 additions and 88 deletions
+6 -3
View File
@@ -57,10 +57,13 @@ def compel_encode_prompts(
negative_embeds.append(negative_embed)
negative_pooleds.append(negative_pooled)
prompt_embeds = torch.cat(prompt_embeds, dim=0)
negative_embeds = torch.cat(negative_embeds, dim=0)
if shared.sd_model_type == "sdxl":
if prompt_embeds is not None:
prompt_embeds = torch.cat(prompt_embeds, dim=0)
if negative_embeds is not None:
negative_embeds = torch.cat(negative_embeds, dim=0)
if positive_pooleds is not None and shared.sd_model_type == "sdxl":
positive_pooleds = torch.cat(positive_pooleds, dim=0)
if negative_pooleds is not None and shared.sd_model_type == "sdxl":
negative_pooleds = torch.cat(negative_pooleds, dim=0)
return prompt_embeds, positive_pooleds, negative_embeds, negative_pooleds