stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: "Image not allowed"
Checklist
- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
What happened?
The output folder for my installation is a junction. It's there to use multiple image generation installations. With a fresh 1.8.0, the image isn't displayed anymore after generation, just a 'broken icon'.
Opening the URL for the image gives a JSON output: error | "HTTPException" detail | "File not allowed: V:/stable_diffusion_shared/outputs/txt2img-images/test/Test Image/Crystal Clear XL_v1.0_SDXL1.0/00003-S=3154920067-St=40-Sa=DPM++ 3M SDE Karras-Cfg=7.png." errors | "(403, 'File not allowed: V:/stable_diffusion_shared/outputs/txt2img-images/test/Test Image/Crystal Clear XL_v1.0_SDXL1.0/00003-S=3154920067-St=40-Sa=DPM++ 3M SDE Karras-Cfg=7.png.')"
In 1.70 it works perfectly fine, so something weird happened in 1.8.0 again. How to fix that, please?
Steps to reproduce the problem
Generate image Broken preview
What should have happened?
Accessible preview
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
Console logs
Restarting UI...
Closing server running on port: 7861
Running on local URL: http://127.0.0.1:7861
To create a public link, set `share=True` in `launch()`.
Startup time: 1.6s (load scripts: 0.2s, create ui: 0.7s, gradio launch: 0.1s, add APIs: 0.4s).
0%| V:\AI_programms\stable-diffusion-webui-180\venv\lib\site-packages\torchsde\_brownian\brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643.
warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.52it/s]
*** Error completing request, 1.59it/s]
*** Arguments: ('task(of18gch6f385kxf)', <gradio.routes.Request object at 0x00000181B5C1E5F0>, '[Test Image:9999]photo of a delicious grilled steak with side dishes, laying on many white feathers on a dark wooden table, food photography, intricate details, sharp focus, ambient lighting', 'deviantart', [], 40, 'DPM++ 3M SDE Karras', 1, 1, 7, 848, 1200, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, '', 0.5, True, False, '', 'Lerp', False, False, False, 'positive', 'comma', 0, False, False, 'start', '', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
Traceback (most recent call last):
File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 36, in f
res = func(*args, **kwargs)
File "V:\AI_programms\stable-diffusion-webui-180\modules\txt2img.py", line 110, in txt2img
processed = processing.process_images(p)
File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 785, in process_images
res = process_images_inner(p)
File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 1016, in process_images_inner
images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], opts.samples_format, info=infotext(i), p=p)
File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 685, in save_image
_atomically_save_image(image, fullfn_without_extension, extension)
File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 669, in _atomically_save_image
save_image_with_geninfo(image_to_save, info, temp_file_path, extension, existing_pnginfo=params.pnginfo, pnginfo_section_name=pnginfo_section_name)
File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 537, in save_image_with_geninfo
image_format = Image.registered_extensions()[extension]
KeyError: ''
---
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.52it/s]
*** Error completing request, 1.59it/s]
*** Arguments: ('task(90660ypyq6ur0d0)', <gradio.routes.Request object at 0x000001830175E2C0>, '[Test Image:9999]photo of a delicious grilled steak with side dishes, laying on many white feathers on a dark wooden table, food photography, intricate details, sharp focus, ambient lighting', 'deviantart', [], 40, 'DPM++ 3M SDE Karras', 1, 1, 7, 848, 1200, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, '', 0.5, True, False, '', 'Lerp', False, False, False, 'positive', 'comma', 0, False, False, 'start', '', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
Traceback (most recent call last):
File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "V:\AI_programms\stable-diffusion-webui-180\modules\call_queue.py", line 36, in f
res = func(*args, **kwargs)
File "V:\AI_programms\stable-diffusion-webui-180\modules\txt2img.py", line 110, in txt2img
processed = processing.process_images(p)
File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 785, in process_images
res = process_images_inner(p)
File "V:\AI_programms\stable-diffusion-webui-180\modules\processing.py", line 1016, in process_images_inner
images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], opts.samples_format, info=infotext(i), p=p)
File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 685, in save_image
_atomically_save_image(image, fullfn_without_extension, extension)
File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 669, in _atomically_save_image
save_image_with_geninfo(image_to_save, info, temp_file_path, extension, existing_pnginfo=params.pnginfo, pnginfo_section_name=pnginfo_section_name)
File "V:\AI_programms\stable-diffusion-webui-180\modules\images.py", line 537, in save_image_with_geninfo
image_format = Image.registered_extensions()[extension]
KeyError: ''
---
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.51it/s]
Total progress: 200it [04:26, 1.33s/it]
Restarting UI...200it [04:26, 1.58it/s]
Closing server running on port: 7861
Running on local URL: http://127.0.0.1:7861
To create a public link, set `share=True` in `launch()`.
Startup time: 1.5s (load scripts: 0.2s, create ui: 0.8s, gradio launch: 0.1s, add APIs: 0.2s).
0%| | 0/40 [00:00<?, ?it/s]V:\AI_programms\stable-diffusion-webui-180\venv\lib\site-packages\torchsde\_brownian\brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643.
warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.50it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:27<00:00, 1.44it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.50it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:28<00:00, 1.43it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.51it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:27<00:00, 1.44it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.52it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:27<00:00, 1.44it/s]
100%|█████████████████████████████████████████████████████████████████████████| 40/40 [00:26<00:00, 1.49it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:28<00:00, 1.42it/s]
Total progress: 100%|█████████████████████████████████████████████████████████| 40/40 [00:28<00:00, 1.59it/s]
Additional information
No response
Same behavior.
May this be related?
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12822
Same issue here, running WebUI through Chrome but also tried Edge. Thought it might be related to adblock somehow but disabling Ublock changed nothing. I saw the OP mention that their install is through a junction, my models and output folders are both symlinked as well but I've got no idea if that is contributing to this or not. Oddly enough the UI does show a grid of the images generated if that option is chosen, it confuses me that it can show a grid of the images but not the images themselves but hopefully some smart person will figure it out haha..
Since I've been adding the models folder and the output folder as a junction in the WebUI 'forever' and it works in SD:Next and WebUI 1.7.0, I'm sure either the code was changed in the 1.8.0 version of WebUI or the damn Gradio made some changes. Either way, it should be fixed as soon as possible as it is very annoying. 😐
After reading comment here I tried to temporary rename my old output folder (it's using junction to another ssd), and use normal output folder and indeed it works
It was working in 1.7.0 using junction output folder though
Your actual error:
image_format = Image.registered_extensions()[extension] KeyError: ''
Looks like your saved files extension in the settings is empty
Your actual error:
image_format = Image.registered_extensions()[extension] KeyError: ''
Looks like your saved files extension in the settings is empty
File not allowed: V:/stable_diffusion_shared/outputs/txt2img-images/test/Test Image/Crystal Clear XL_v1.0_SDXL1.0/00003-S=3154920067-St=40-Sa=DPM++ 3M SDE Karras-Cfg=7.png
To me, it looks like it knows the file extension.
And no, the fields are of course not empty.
I'm pretty sure it's a Gradio thing again, and it would be nice if we get a solution for his soon, please.
I tried to temporary rename my old output folder and indeed it works
After reading this I tried going into the WebUI settings and manually directing the file saving section towards my actual outputs folder, and not the junction. This fixed the issue for me and images are now shown properly in the UI after generation.
So, to solve just go to Settings>Saving Images> Paths for Saving and then paste in the actual locations to your various folders. It might work to just change the outputs folder but I figured I'd be safe and change all the ones below instead, which definitely works.
@BlastedRemnants Thanks for this work around. Absolute paths always work, but doing that defeats kind of the purpose of the junction. And the problem still exists, that didn't exist in 1.7.0
Fair enough, I have no idea why it stopped working like it used to but I'm just happy to be able to see my images in the UI again haha. I also never used junctions before I got into playing with SD so I'm fairly new to them and don't know if it's common for apps to have issues accessing them or not, probably never would've occurred to me if it wasn't for the other comment above.
I am facing a similar "File not allowed" error but the image is generated and saved successfully, only the preview is breaking. This is specifically happening when I have # (hashtag) in folder name, if I keep it simple then output preview is working fine.
i met 'File not allowed' error only in api called task.
this is very confuse
if i do task on webui, the imge could be displayed on page, and also could be get by api
if i call api (txt2img or img2img), the tasks' status are done, but get file api will get 'File not allowed'
i have check the folder on the server, the images exist.