Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: All generated images are being saved in local/temp/gradio #11185

Open
1 task done
nitingrg opened this issue Jun 12, 2023 · 6 comments
Open
1 task done

[Bug]: All generated images are being saved in local/temp/gradio #11185

nitingrg opened this issue Jun 12, 2023 · 6 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@nitingrg
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Everytime I generate an image, its saved into /local/temp/gradio.

I have turned off save images in the settings but it still saves images there. How can I prevent this or auto delete images once I close Stable DIffusion?

Steps to reproduce the problem

  1. Run SD
  2. Generate images
  3. Check C:\Users<username>\AppData\Local\Temp\gradio

What should have happened?

No images should be saved if I turn off the save images option.

Commit where the problem happens

baf6946

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 ?

Microsoft Edge

Command Line Arguments

set COMMANDLINE_ARGS=--xformers

List of extensions

open pose editor
sd-webui-controlnet
ultimate-upscale-for-automatic1111
LDSR
Lora
ScuNET
SwinIR
prompt-bracket-checker

Console logs

venv "D:\stabledif\stable-diffusion-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.2
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Installing requirements

Launching Web UI with arguments: --xformers
2023-06-12 11:03:53,205 - ControlNet - INFO - ControlNet v1.1.224
ControlNet preprocessor location: D:\stabledif\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads2023-06-12 11:03:53,280 - ControlNet - INFO - ControlNet v1.1.224
Loading weights [fc2511737a] from D:\stabledif\stable-diffusion-webui\models\Stable-diffusion\chilloutmix_NiPrunedFp32Fix.safetensors
Creating model from config: D:\stabledif\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 7.0s (import torch: 1.7s, import gradio: 0.9s, import ldm: 0.5s, other imports: 0.8s, list SD models: 0.2s, load scripts: 1.4s, create ui: 0.3s, gradio launch: 1.0s).
Loading VAE weights specified in settings: D:\stabledif\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying optimization: xformers... done.
Textual inversion embeddings loaded(2): advntr, HyperStylizeV6
Textual inversion embeddings skipped(3): nartfixer, nfixer, nrealfixer
Model loaded in 4.9s (load weights from disk: 0.7s, create model: 0.7s, apply weights to model: 1.0s, apply half(): 0.7s, load VAE: 0.1s, move model to device: 0.8s, load textual inversion embeddings: 0.9s).

Additional information

No response

@nitingrg nitingrg added the bug-report Report of a bug, yet to be confirmed label Jun 12, 2023
@Kurogawa
Copy link

Kurogawa commented Jun 13, 2023

I think that's technically not a bug? since you need your pics actually being "generated" no matter you want to save or not. but anyway, you can try to make a nested folders in your webui root directory and name the inside folder "gradio". then in your webui-user.bat, do set the working path with your webui root directory to TEMP and TMP like this:
set TEMP=D:\stable-diffusion-webui\nestedfolder_with_gradio_inside(any name you like)
set TMP=D:\stable-diffusion-webui\nestedfolder_with_gradio_inside(any name you like)
then your generated pics should be in gradio folder, at least that's how I did. And you can delete things easier with ctrl + a and shift + del

@Pmejna
Copy link

Pmejna commented Jun 14, 2023

I think this is still technically a bug as this should be handled by automatic1111. This issue started appearing to me as well after recent git pull. Not sure what version I had previously but for sure this hasn't happening before

@DvST8x
Copy link

DvST8x commented Jun 15, 2023

Before the recent change the images were saved under
C:\Users<username>\AppData\Local\Temp
The recent change organized them under a subfolder
C:\Users<username>\AppData\Local\Temp\gradio

There's a few other posts asking about this for example
If the setting to not save images doesn't do what most people think it should be removed or renamed?
I ended up creating a batch file to have a easy one click way of cleaning out this folder.

ECHO OFF del "C:\Users\<username>\AppData\Local\Temp\gradio\*.*" /s /f /q EXIT

@Anthonyg5005
Copy link

Server needs a way to send the file to the browser, it's how webapps work

@dmitrijkiltau
Copy link

I think we all understand, that a temporary save location is necessary, but shouldn't it be, well, temporary? The temp folder should be cleaned on close or maybe on start and not to be cleaned manually.

@palentir
Copy link

I looked into it and it seems that "gradio" is croatian for "built". I believe the files are generated by ControlNet.
You should maybe test that then close this and open it in controlnet's git page instead, they need a setting to allow redirect of the temp location. However Kurogawa's solution works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

7 participants