AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.97k stars 26.51k forks source link

[Bug]: incorrect file path when prompt contains new line #4685

Closed inobrevi closed 1 year ago

inobrevi commented 1 year ago

Is there an existing issue for this?

What happened?

prompt:

portrait of a woman, art by
Henry Asencio   
Anton Fadeev    
Artgerm
Bastien Lecouffe-Deharme    
Carne Griffiths 
Darek Zabrocki  
Patrice Murciano    
Russ Mills  
WLOP
Yoji Shinkawa   

error:

OSError: [Errno 22] Invalid argument: 'outputs/txt2img-images\\02357-757535083-portrait of a woman, art by_Henry Asencio\t_Anton Fadeev\t_Artgerm_Bastien Lecouffe-Deharme\t_Carne Griffiths\t_Darek Zabrocki\t_Patr.png'

Steps to reproduce the problem

use prompt with new line symbol

What should have happened?

The script should convert that to safe saving reading name

Commit where the problem happens

98947d173e3f1667eba29c904f681047dea9de90

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No response

Additional information, context and logs

No response

krisfail commented 1 year ago

Could not reproduce. More information would be appreciated.

inobrevi commented 1 year ago

Thank you for looking into it. With new insight: it is not new line, it is '\t' tab symbol. Basically possible only when pasting.