[bug] fix errors related to context length in SD (#9388)

This commit is contained in:
Liangsheng Yin
2025-08-21 10:32:34 +08:00
committed by GitHub
parent 25ef53f05f
commit eb19ccadae
5 changed files with 23 additions and 14 deletions

View File

@@ -576,7 +576,7 @@ class TokenizerManager:
f"model's context length ({self.context_len} tokens). "
"Truncating the input."
)
input_ids = input_ids[:_max_req_len]
del input_ids[_max_req_len:]
input_token_num = len(input_ids)
else:
raise ValueError(