mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-16 04:49:35 +08:00
Add a guard if no <|im_start|> token is found.
This commit is contained in:
parent
4fe507248c
commit
6445abe8a0
@ -117,6 +117,9 @@ class LongCatImageTEModel(sd1_clip.SD1ClipModel):
|
|||||||
if tok_pairs[template_end + 2][0] == 198:
|
if tok_pairs[template_end + 2][0] == 198:
|
||||||
template_end += 3
|
template_end += 3
|
||||||
|
|
||||||
|
if template_end == -1:
|
||||||
|
template_end = 0
|
||||||
|
|
||||||
suffix_start = None
|
suffix_start = None
|
||||||
for i in range(len(tok_pairs) - 1, -1, -1):
|
for i in range(len(tok_pairs) - 1, -1, -1):
|
||||||
elem = tok_pairs[i][0]
|
elem = tok_pairs[i][0]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user