Add a check and explanation for tensor with all NaNs.

This commit is contained in:
AUTOMATIC
2023-01-16 22:59:46 +03:00
parent 52f6e94338
commit 9991967f40
3 changed files with 33 additions and 0 deletions

View File

@@ -351,6 +351,8 @@ class CFGDenoiser(torch.nn.Module):
x_out[-uncond.shape[0]:] = self.inner_model(x_in[-uncond.shape[0]:], sigma_in[-uncond.shape[0]:], cond={"c_crossattn": [uncond], "c_concat": [image_cond_in[-uncond.shape[0]:]]})
devices.test_for_nans(x_out, "unet")
if opts.live_preview_content == "Prompt":
store_latent(x_out[0:uncond.shape[0]])
elif opts.live_preview_content == "Negative prompt":