diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-16 19:59:46 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-16 19:59:46 +0000 |
commit | 9991967f40120b88a1dc925fdf7d747d5e016888 (patch) | |
tree | fd622c4c330bf948edef259badee58a2d59939f5 /modules/sd_samplers.py | |
parent | 52f6e94338f31c286361802b08ee5210b8244141 (diff) | |
download | stable-diffusion-webui-gfx803-9991967f40120b88a1dc925fdf7d747d5e016888.tar.gz stable-diffusion-webui-gfx803-9991967f40120b88a1dc925fdf7d747d5e016888.tar.bz2 stable-diffusion-webui-gfx803-9991967f40120b88a1dc925fdf7d747d5e016888.zip |
Add a check and explanation for tensor with all NaNs.
Diffstat (limited to 'modules/sd_samplers.py')
-rw-r--r-- | modules/sd_samplers.py | 2 |
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":
|