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

Some recent changes forget to manage tmp folders #4431

Closed
1 task done
lllyasviel opened this issue Jun 6, 2023 · 1 comment
Closed
1 task done

Some recent changes forget to manage tmp folders #4431

lllyasviel opened this issue Jun 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@lllyasviel
Copy link

Describe the bug

Some recent changes use the tmp folder, but carelessly forget to create that folder, making many bug reports in downstream projects.

They all somewhat looks like

File "F:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "F:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "F:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "F:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 4461, in postprocess
file = self.pil_to_temp_file(img, dir=self.DEFAULT_TEMP_DIR)
File "F:\AI\stable-diffusion-webui\modules\ui_tempdir.py", line 55, in save_pil_to_file
file_obj = tempfile.NamedTemporaryFile(delete=False, suffix=".png", dir=dir)
File "C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 559, in NamedTemporaryFile
file = _io.open(dir, mode, buffering=buffering,
File "C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 556, in opener
fd, name = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 256, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\XXXXX\AppData\Local\Temp\gradio\tmp2514rfci.png'

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

See also

Mikubill/sd-webui-controlnet#1563

Mikubill/sd-webui-controlnet#1564

continue-revolution/sd-webui-segment-anything#115

AUTOMATIC1111/stable-diffusion-webui#11040

AUTOMATIC1111/stable-diffusion-webui#10787 (comment)

Screenshot

No response

Logs

na

System Info

na

Severity

blocking upgrade to latest gradio version

@lllyasviel lllyasviel added the bug Something isn't working label Jun 6, 2023
@lllyasviel
Copy link
Author

I am temporarily closing this as I am not sure if this is Gradio or Automatic1111 problem. Feel free to reopen if problem source confirmed.

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

No branches or pull requests

1 participant