mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-15 07:03:06 +03:00
Replace invalid filename chars with an underscore
... instead of removing them altogether.
This makes the prompt editing filenames [old🆕step] easier to read
This commit is contained in:
parent
7fe00d0840
commit
deea9f4d70
@ -252,7 +252,7 @@ def sanitize_filename_part(text, replace_spaces=True):
|
||||
if replace_spaces:
|
||||
text = text.replace(' ', '_')
|
||||
|
||||
return text.translate({ord(x): '' for x in invalid_filename_chars})[:128]
|
||||
return text.translate({ord(x): '_' for x in invalid_filename_chars})[:128]
|
||||
|
||||
|
||||
def apply_filename_pattern(x, p, seed, prompt):
|
||||
|
Loading…
Reference in New Issue
Block a user