Repository: stable-diffusion-webui
Issue: [Bug]: Directory for temporary images does not work
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

I have created a custom folder for the temporary images and it still saves the images in AppdataLocalTemp.

It is strange, because in previous versions, when I changed the default tmp folder, SD saved the tmp images in that folder and not in the default path.

### Steps to reproduce the problem

1. Go to setting - saving images/grids - Directory for temporary images; leave empty by default and add custom folder
2. Press ....apply settings
3. ...generate any image
4. SD still saves the images in AppdataLocalTemp


### What should have happened?

Once the default tmp folder has been changed, SD should use it.

### Commit where the problem happens

version: v1.3.1  •  python: 3.10.6  •  torch: 2.0.1+cu118  •  xformers: N/A  •  gradio: 3.31.0  •  checkpoint: fd3bfb1ea7

### What Python version are you running on ?

Python 3.10.x

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

Windows

### What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

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

Google Chrome

### Command Line Arguments

```Shell
No
```


### List of extensions

Stable-Diffusion-Webui-Civitai-Helper
adetailer
sd-webui-controlnet

### Console logs

```Shell
venv "D:\webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.3.1
Commit hash: b6af0a3809ea869fb180633f9affcae4b199ffcf
Installing requirements


Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: D:\webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
[-] ADetailer initialized. version: 23.6.1.post0, num models: 8
ControlNet v1.1.210
ControlNet v1.1.210
Loading weights [fd3bfb1ea7] from D:\webui\models\Stable-diffusion\hrl_v40.safetensors
Create LRU cache (max_size=16) for preprocessor results.
Create LRU cache (max_size=16) for preprocessor results.
Creating model from config: D:\webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Create LRU cache (max_size=16) for preprocessor results.
Startup time: 5.4s (import torch: 1.1s, import gradio: 0.8s, import ldm: 0.4s, other imports: 0.6s, load scripts: 1.9s, create ui: 0.4s, gradio launch: 0.2s).
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: D:\webui\models\VAE\vae-ft-mse-840000-ema-pruned.ckpt
Applying optimization: Doggettx... done.
Textual inversion embeddings loaded(0):
Model loaded in 3.1s (load weights from disk: 0.6s, create model: 0.4s, apply weights to model: 0.5s, apply half(): 0.4s, load VAE: 0.2s, move model to device: 0.4s, load textual inversion embeddings: 0.7s).
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  7.13it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 13.95it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 11.22it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 13.30it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 12.24it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 14.13it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 14.47it/s]
```


### Additional information

_No response_