fix the problem with infinite prompts where empty cond would be calculated incorrectly

This commit is contained in:
AUTOMATIC1111
2024-06-28 11:15:34 +03:00
parent 0b64633584
commit 179ae47d64
3 changed files with 10 additions and 11 deletions

View File

@@ -47,8 +47,7 @@ class SD3Inferencer(torch.nn.Module):
return contextlib.nullcontext()
def get_learned_conditioning(self, batch: list[str]):
with devices.without_autocast():
return self.cond_stage_model(batch)
return self.cond_stage_model(batch)
def apply_model(self, x, t, cond):
return self.model(x, t, c_crossattn=cond['crossattn'], y=cond['vector'])