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

Gradio creates a lot of empty temporary folders on each run #3592

Closed
1 task done
space-nuko opened this issue Mar 23, 2023 · 2 comments · Fixed by #4256
Closed
1 task done

Gradio creates a lot of empty temporary folders on each run #3592

space-nuko opened this issue Mar 23, 2023 · 2 comments · Fixed by #4256
Assignees
Labels
bug Something isn't working
Milestone

Comments

@space-nuko
Copy link
Contributor

space-nuko commented Mar 23, 2023

Describe the bug

Described in AUTOMATIC1111/stable-diffusion-webui#8752 (comment), every time a Gradio app is launched it creates multiple temporary folders, and a lot of them remain empty. This is somewhat important because a lot of webui users want to inspect intermediate outputs and it's hard to sift through dozens of temporary folders.

Even if there needs to be an autogenerated temp folder each startup, would be better to cut down on the number of temporary folders introduced

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

Just run a Gradio app with a large number of components and watch how many temporary folders are added

Screenshot

No response

Logs

N/A

System Info

3.23.0, Windows, Chrome

Severity

annoying

@space-nuko space-nuko added the bug Something isn't working label Mar 23, 2023
@abidlabs abidlabs self-assigned this Mar 23, 2023
@abidlabs abidlabs added this to the 3.x milestone Mar 23, 2023
@abidlabs
Copy link
Member

Interesting. Empty folders should not be created -- I'll take a look at this

@freddyaboulton
Copy link
Collaborator

freddyaboulton commented May 17, 2023

Hi @space-nuko !

Is this still an issue in the latest gradio release? All the files created by gradio should now be located in tempfile.gettempdir() / "gradio" by default and any subdirectories are created when postprocessing of a component is run, e.g. Gallery.postprocess, Video.postprocess. I can't see the empty directories created on launch.

If there is a repro we can run outside the sd web ui, that would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants