fix NaN issue when running without --precision half

This commit is contained in:
AUTOMATIC1111
2024-06-16 14:09:32 +03:00
parent 80f618ea95
commit 06d0a5ab4d
2 changed files with 3 additions and 3 deletions

View File

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