aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_samplers.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-16 22:59:46 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-16 22:59:46 +0300
commit9991967f40120b88a1dc925fdf7d747d5e016888 (patch)
treefd622c4c330bf948edef259badee58a2d59939f5 /modules/sd_samplers.py
parent52f6e94338f31c286361802b08ee5210b8244141 (diff)
Add a check and explanation for tensor with all NaNs.
Diffstat (limited to 'modules/sd_samplers.py')
-rw-r--r--modules/sd_samplers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py
index 76e0e0d5..6261d1f7 100644
--- a/modules/sd_samplers.py
+++ b/modules/sd_samplers.py
@@ -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":