Skip to content

Commit a316815

Browse files
Fix crash with ace step 1.5 (Comfy-Org#12264)
1 parent 855849c commit a316815

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

comfy/text_encoders/ace15.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def sample_manual_loop_no_classes(
1919
min_tokens: int = 1,
2020
max_new_tokens: int = 2048,
2121
audio_start_id: int = 151669, # The cutoff ID for audio codes
22+
audio_end_id: int = 215669,
2223
eos_token_id: int = 151645,
2324
):
2425
device = model.execution_device
@@ -60,6 +61,7 @@ def sample_manual_loop_no_classes(
6061
remove_logit_value = torch.finfo(cfg_logits.dtype).min
6162
# Only generate audio tokens
6263
cfg_logits[:, :audio_start_id] = remove_logit_value
64+
cfg_logits[:, audio_end_id:] = remove_logit_value
6365

6466
if eos_token_id is not None and eos_token_id < audio_start_id and min_tokens < step:
6567
cfg_logits[:, eos_token_id] = eos_score

0 commit comments

Comments
 (0)