Sygil-Dev / stable-diffusion

GNU Affero General Public License v3.0
1.72k stars 148 forks source link

Prompt longer than 123 characters crashes #125

Closed arbidroid closed 2 years ago

arbidroid commented 2 years ago

Traceback (most recent call last): File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\gradio\routes.py", line 247, in run_predict output = await app.blocks.process_api( File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\gradio\blocks.py", line 641, in process_api predictions, duration = await self.call_function(fn_index, processed_input) File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\gradio\blocks.py", line 556, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "scripts/webui.py", line 926, in txt2img output_images, seed, info, stats = process_images( File "scripts/webui.py", line 826, in process_images save_sample(image, sample_path_i, filename, jpg_sample, prompts, seeds, width, height, steps, cfg_scale, File "scripts/webui.py", line 515, in save_sample image.save(f"{filename_i}.png") File "C:\Users\My Username.conda\envs\ldo\lib\site-packages\PIL\Image.py", line 2317, in save fp = builtins.open(filename, "w+b") FileNotFoundError: [Errno 2] No such file or directory: 'outputs/txt2img-samples\samples\A_baby_gorilla_sits_on_a_large_flat_rock_surface,_holds_a_bamboo_branch_in_one_hand,_and_hugs_a_larger_gorilla’s_leg_with_the_ot\00000-17_k_lms_1344767371.png'

This didn't happen for older version where folders were not created for each prompt.

Tested in Windows 11.

hlky commented 2 years ago

Then don't use the option to save files by prompt.

or move the entire stable diffusion directory to a shorter path

This is not a bug, it is an issue with your setup.