File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ def INPUT_TYPES(s):
6363 RETURN_TYPES = "AUDIO" ,
6464 CATEOGRY = "Orpheus"
6565 def decode (self , tokens , vae ):
66+ #trim any section tokens from start or end
67+ start_index = 0
68+ while tokens [start_index ] < tokeniser_length + 10 :
69+ start_index += 1
70+ end_index = 0
71+ while tokens [end_index - 1 ] < tokeniser_length + 10 :
72+ end_index -= 1
73+ if start_index != 0 or end_index != 0 :
74+ tokens = tokens [start_index :end_index ]
6675 #assert len(tokens) % 7 == 0
6776 tokens = tokens [:len (tokens )// 7 * 7 ]
6877 t = torch .tensor (tokens ).reshape ((- 1 ,7 ))
Original file line number Diff line number Diff line change 11[project ]
22name = " comfyui-orpheus"
33description = " Nodes for using Orpheus-TTS in ComfyUI"
4- version = " 0.1.3 "
4+ version = " 0.1.4 "
55classifiers = [
66 " License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
77]
You can’t perform that action at this time.
0 commit comments