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

Per Image Mode Batch Higher than 1 UI Issue #5

Closed
boricuapab opened this issue Aug 13, 2023 · 5 comments
Closed

Per Image Mode Batch Higher than 1 UI Issue #5

boricuapab opened this issue Aug 13, 2023 · 5 comments

Comments

@boricuapab
Copy link

boricuapab commented Aug 13, 2023

When using Per Image mode and batch higher than 1, I get this error and the images dont display in the UI

  File "C:\sdLocal\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\sdLocal\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 "C:\sdLocal\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "C:\sdLocal\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 "C:\sdLocal\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\Administrator\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 559, in NamedTemporaryFile
    file = _io.open(dir, mode, buffering=buffering,
  File "C:\Users\Administrator\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\Administrator\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\\ADMINI~1\\AppData\\Local\\Temp\\gradio\\tmp0f2anzoo.png'

The images do get generated though.

@boricuapab boricuapab changed the title Per Image Mode Batch Higher than 1 Issue Per Image Mode Batch Higher than 1 UI Issue Aug 13, 2023
@if-ai
Copy link
Owner

if-ai commented Aug 14, 2023

Umm I can't reproduce it are you in the latest version? I tried even adding a lora and with different counts I always get the result correct. Your error message is pointing to a missing directory on temp maybe you were freeing up space or deleted the recycle bin while generating and the temp files were erased?

@if-ai
Copy link
Owner

if-ai commented Aug 15, 2023

I looks like I had some bad name please try updating the extension sorry for the inconvenience

@boricuapab
Copy link
Author

I updated to the latest for the extension but still have this issue occuring.

One strange thing I noticed is that the total steps cound in the cmd window is higher than what I prompted for.

In this case I did a batch of 4 with 28 steps, but total steps it's saying it'll go through is up to 898 which is way higher than the expected total of 112 (28x4)

samplingHigh

@if-ai
Copy link
Owner

if-ai commented Aug 17, 2023

It seems to be a problem with gradio and how Automatic handles the temp files. This is going to take a while to solve the steps are weird I am going to have to spend some time debugging this
As on this issue

@boricuapab
Copy link
Author

Working after a reinstall of 1.6

batch4Works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants