stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Adding optional tag shuffling for training

Open tinker495 opened this issue 3 years ago • 4 comments

When conducting training, there is a chance that a fixed tag sequence can effect training while working with deepdanbooru, due to the model utilizing attention. As far as i know, in the training case of Waifu Diffusion, a tag has been shuffled to reduce the effect of the tag sequence. Thus I added the following function considering that it would be helpful when training if there is an option that shuffles tag sequence randomly in every text generation. This worked well when I applied this function on my own embedding training

tinker495 avatar Nov 01 '22 14:11 tinker495

Shouldn't tag shuffle occur for every text token inside a random self.lines, instead of just [filewords] ?

ghost avatar Nov 02 '22 06:11 ghost

Shouldn't tag shuffle occur for every text token inside a random self.lines, instead of just [filewords] ?

As far as i know, NAI network shown better quality using prompts 'masterpiece, best quality' in front of another tag. I think some tags must be fix in the position as options. if want to shuffle tags instead of just [filewords], then we can modify textual_inversion_templates files.

tinker495 avatar Nov 02 '22 08:11 tinker495

I'd rather have it as a setting in the settings section for training.

AUTOMATIC1111 avatar Nov 04 '22 08:11 AUTOMATIC1111

I moved the option to the Training setting section.

tinker495 avatar Nov 04 '22 10:11 tinker495

Added the option to apply dropouts to tags to reduce the impact of excessive incorrect tag entry. I think the impact on excessive inaccurate tags can be reduced.

tinker495 avatar Nov 11 '22 01:11 tinker495