revise caster

This commit is contained in:
lllyasviel
2023-12-16 16:58:46 -08:00
committed by GitHub
parent ec5dd950a2
commit 085bc3aeaa
3 changed files with 40 additions and 57 deletions
+2 -2
View File
@@ -271,8 +271,8 @@ def sdxl_encode_adm_patched(self, **kwargs):
height = float(height) * positive_adm_scale
def embedder(number_list):
h = torch.tensor(number_list, dtype=torch.float32)
h = self.embedder(h)
h = [self.embedder(torch.tensor([x], dtype=torch.float32)) for x in number_list]
h = torch.cat(h)
h = torch.flatten(h).unsqueeze(dim=0).repeat(clip_pooled.shape[0], 1)
return h