add infotext entry for emphasis; put emphasis into a separate file, add an option to parse but still ignore emphasis

This commit is contained in:
AUTOMATIC1111
2024-02-11 09:39:51 +03:00
parent 3732cf2f97
commit e2b19900ec
6 changed files with 89 additions and 13 deletions

View File

@@ -32,7 +32,7 @@ def process_text_old(self: sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase,
embedding, embedding_length_in_tokens = self.hijack.embedding_db.find_embedding_at_position(tokens, i)
mult_change = self.token_mults.get(token) if shared.opts.enable_emphasis else None
mult_change = self.token_mults.get(token) if shared.opts.emphasis != "None" else None
if mult_change is not None:
mult *= mult_change
i += 1