AUTOMATIC1111 / stable-diffusion-webui

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

Hypernetwork training strips important characters from "filewords" #2338

Closed ThereforeGames closed 1 year ago

ThereforeGames commented 2 years ago

Describe the bug When using a training template that includes the [filewords] phrase, the app strips important characters such as commas and numbers. These characters are particularly important for models that have been trained on booru databases, such as WD.

To Reproduce Steps to reproduce the behavior:

  1. Rename your training images to include commas, e.g. "person, black hair, red eyes.png"
  2. Configure the UI to use a training template with content like "[name], [filewords]"
  3. Start training - the UI will list prompts without any commas

Expected behavior Commas and numbers should be preserved during training.

Screenshots N/A

Desktop (please complete the following information):

Additional context N/A

s-ilent commented 2 years ago

This also occurs when training embeddings. If filewords has an major impact on the training result, it would be really good to have them kept as is.

Dekker3D commented 2 years ago

Related to #1552. I had the same issue with TI.

s-ilent commented 2 years ago

One thing to consider with this issue is that the preprocessing step for TI images appends an image to the start of the name. It probably needs to be removed before doing the training if it exists (or leave the names alone if it doesn't) as it'll affect the tags otherwise.

flesnuk commented 2 years ago

Pull latest changes including the commit c3c8eef from A1111 which solves the issue and adds flexibility for filewords. He also updated the wiki: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Textual-Inversion#filewords