Repository: stable-diffusion-webui
Issue: [Bug]: Final render not generated
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

I see the live preview images.
The final render doesn't show up, the image sections just becomes empty.

### Steps to reproduce the problem

Any prompt and just generate

### What should have happened?

The final image should have rendered

### What browsers do you use to access the UI ?

Brave

### Sysinfo

[sysinfo-2024-09-10-01-26.json](https://github.com/user-attachments/files/16938149/sysinfo-2024-09-10-01-26.json)


### Console logs

```Shell
(sd) root@newphobos:/dockerx/stable-diffusion-webui# REQS_FILE='requirements.txt' python launch.py --upcast-sampling --skip-torch-cuda-test --listen
Python 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Launching Web UI with arguments: --upcast-sampling --skip-torch-cuda-test --listen
/opt/conda/envs/sd/lib/python3.10/site-packages/kornia/feature/lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.1.2+cu121 with CUDA 1201 (you have 2.4.1+rocm6.1)
    Python  3.10.13 (you have 3.10.6)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
/opt/conda/envs/sd/lib/python3.10/site-packages/xformers/triton/softmax.py:30: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @custom_fwd(cast_inputs=torch.float16 if _triton_softmax_fp16_enabled else None)
/opt/conda/envs/sd/lib/python3.10/site-packages/xformers/triton/softmax.py:87: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(
/opt/conda/envs/sd/lib/python3.10/site-packages/xformers/ops/swiglu_op.py:107: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(cls, ctx, x, w1, b1, w2, b2, w3, b3):
/opt/conda/envs/sd/lib/python3.10/site-packages/xformers/ops/swiglu_op.py:128: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(cls, ctx, dx5):
No module 'xformers'. Proceeding without it.
Pytorch_lightning.distributed not found, attempting pytorch_lightning.rank_zero
Loading weights [e6bb9ea85b] from /dockerx/stable-diffusion-webui/models/Stable-diffusion/sdXL_v10VAEFix.safetensors
Running on local URL:  http://0.0.0.0:7860

Thanks for being a Gradio user! If you have questions or feedback, please join our Discord server and chat with us: https://discord.gg/feTf9x3ZSB

To create a public link, set `share=True` in `launch()`.
Startup time: 6.1s (import torch: 1.7s, import gradio: 0.4s, setup paths: 3.1s, other imports: 0.4s, load scripts: 0.2s, create ui: 0.2s).
Creating model from config: /dockerx/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
/opt/conda/envs/sd/lib/python3.10/site-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
Applying attention optimization: Doggettx... done.
Model loaded in 4.2s (load weights from disk: 0.5s, create model: 0.2s, apply weights to model: 3.2s, calculate empty prompt: 0.2s).
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:04<00:00,  4.69it/s]
*** Error completing request███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  9.20it/s]
*** Arguments: ('task(akdfrcyzf4tbv7y)', <gradio.routes.Request object at 0x7fe3b7fbf880>, 'cat', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "/dockerx/stable-diffusion-webui/modules/call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
      File "/dockerx/stable-diffusion-webui/modules/call_queue.py", line 53, in f
        res = func(*args, **kwargs)
      File "/dockerx/stable-diffusion-webui/modules/call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "/dockerx/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "/dockerx/stable-diffusion-webui/modules/processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "/dockerx/stable-diffusion-webui/modules/processing.py", line 1002, in process_images_inner
        x_samples_ddim = decode_latent_batch(p.sd_model, samples_ddim, target_device=devices.cpu, check_for_nans=True)
      File "/dockerx/stable-diffusion-webui/modules/processing.py", line 650, in decode_latent_batch
        raise e
      File "/dockerx/stable-diffusion-webui/modules/processing.py", line 637, in decode_latent_batch
        devices.test_for_nans(sample, "vae")
      File "/dockerx/stable-diffusion-webui/modules/devices.py", line 265, in test_for_nans
        raise NansException(message)
    modules.devices.NansException: A tensor with NaNs was produced in VAE. This could be because there's not enough precision to represent the picture. Try adding --no-half-vae commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

---
```


### Additional information

A couple things of importance.
1. My command line with the above output was `REQS_FILE='requirements.txt' python launch.py --upcast-sampling --skip-torch-cuda-test --listen`
1.1 That error is gone when i append `--no-half-vae`
2. If i set my resolution at 512x512 the final image is rendered.
3. If i set the resolution to 1024x1024 **no final image is rendered**
4. GPU AMD 7900XT