Remove legacy temp dir implementation #12332
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #3278 #11040 #11185
A lot of this code is legacy and no longer needed, as Gradio has fixed all these items. This would also resolve the long standing issue of the temp folder never being cleared, which is now doable since all Gradio related files are stored separately under
gradio
now.Some related info:
#3278 (comment)
https://github.com/gradio-app/gradio/blob/34f6b22efbfedfa569d452f3f99ed2e6593e3c21/gradio/components/base.py#L310-L316
gradio-app/gradio#3523
gradio-app/gradio#3597
gradio-app/gradio#4256
This would also prevent any edge cases like this being encountered in the future when Gradio updates. Mikubill/sd-webui-controlnet#1563
This is however a bit of a breaking change in it's current state, as it makes the
temp_dir
setting obsolete. It should be preferred to use theGRADIO_TEMP_DIR
environment variable now. I'm open for suggestions on how to make this more easily accessible to the user though if this is desired.Checklist: