Skip to content

Add # to the invalid_filename_chars list#14640

Merged
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
WebDev9000:replace-hashtags-in-filenames
Jan 20, 2024
Merged

Add # to the invalid_filename_chars list#14640
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom
WebDev9000:replace-hashtags-in-filenames

Conversation

@WebDev9000
Copy link
Copy Markdown
Contributor

Description

Simply adds the # character to the invalid_filename_chars list, which causes it to get replaced by _ in filenames.

Reason is due to a Gradio bug, hashtags in filenames will display as a broken image in the result gallery when the image is saved. This can happen when you have a hashtag in your prompt, lora, etc. if the prompt, lora, or etc. is saved to the filename.

#5271 #5470 (These issues are closed but the problem persists)

Screenshots/videos:

image

Before change
cat
(sped up a bit)

The image is saved correctly, but can't be displayed.
Filename: image

After change
image

The image is displayed and still saved, expect with # replaced by _.
Filename: image

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 merged commit 58a142b into AUTOMATIC1111:dev Jan 20, 2024
@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants