mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-21 15:21:49 -08:00
Add a check and explanation for tensor with all NaNs.
This commit is contained in:
parent
52f6e94338
commit
9991967f40
3 changed files with 33 additions and 0 deletions
|
|
@ -608,6 +608,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
|||
samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength, prompts=prompts)
|
||||
|
||||
x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))]
|
||||
for x in x_samples_ddim:
|
||||
devices.test_for_nans(x, "vae")
|
||||
|
||||
x_samples_ddim = torch.stack(x_samples_ddim).float()
|
||||
x_samples_ddim = torch.clamp((x_samples_ddim + 1.0) / 2.0, min=0.0, max=1.0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue