Disable prompt weights for qwen. (#9438)

This commit is contained in:
comfyanonymous
2025-08-19 22:08:11 -07:00
committed by GitHub
parent 7cd2c4bd6a
commit 5a8f502db5
2 changed files with 6 additions and 3 deletions

View File

@@ -534,7 +534,10 @@ class SDTokenizer:
min_padding = tokenizer_options.get("{}_min_padding".format(self.embedding_key), self.min_padding)
text = escape_important(text)
parsed_weights = token_weights(text, 1.0)
if kwargs.get("disable_weights", False):
parsed_weights = [(text, 1.0)]
else:
parsed_weights = token_weights(text, 1.0)
# tokenize words
tokens = []