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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue