-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathaudioModelSearch.py
More file actions
126 lines (116 loc) · 4.31 KB
/
Copy pathaudioModelSearch.py
File metadata and controls
126 lines (116 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
class RunwareAudioModelSearch:
"""Audio Model Search node for searching audio models"""
# Define the audio models by provider
AUDIO_MODELS = {
"ElevenLabs": [
"elevenlabs:1@1 (ElevenLabs Multilingual v2)",
"elevenlabs:2@1 (ElevenLabs Multilingual v2 Turbo)",
"elevenlabs:3@1 (ElevenLabs Monolingual v1)",
],
"KlingAI": [
"klingai:8@1 (KlingAI Audio)",
],
"Mirelo": [
"mirelo:1@1 (Mirelo SFX 1.5)",
],
"Ace": [
"runware:ace-step@0 (ACE Step v1 3.5B)",
"runware:ace-step@v1.5-base (ACE-Step v1.5 Base)",
"runware:ace-step@v1.5-turbo (ACE-Step v1.5 Turbo)",
"runware:ace-step@v1.5-xl-base (ACE-Step v1.5 XL Base)",
"runware:ace-step@v1.5-xl-turbo (ACE-Step v1.5 XL Turbo)",
"runware:ace-step@v1.5-xl-sft (ACE-Step v1.5 XL SFT)",
],
"Alibaba": [
"alibaba:qwen@3-tts-1.7b-voicedesign (Qwen3 TTS 1.7B Voice Design)",
"alibaba:qwen@3-tts-1.7b-customvoice (Qwen3 TTS 1.7B Custom Voice)",
"alibaba:qwen@3-tts-1.7b-base (Qwen3 TTS 1.7B Base)",
],
"Dia": [
"runware:dia@v1.0 (Dia 1.6B)",
"runware:dia2@2b (Dia2 2B)",
],
"xAI": [
"xai:voice@tts (xAI TTS)",
],
"MiniMax": [
"minimax:speech@2.8 (MiniMax Speech 2.8)",
"minimax:music@cover (MiniMax Music Cover)",
"minimax:music@2.6 (MiniMax Music 2.6)",
],
"Inworld": [
"inworld:tts@2 (Inworld Realtime TTS 2)",
"inworld:tts@1.5-mini (Inworld TTS-1.5 Mini)",
"inworld:tts@1.5-max (Inworld TTS-1.5 Max)",
],
"Google": [
"google:gemini@3.1-flash-tts (Gemini 3.1 Flash TTS)",
],
"Fish": [
"fishaudio:s2.1@pro (Fish Audio S2.1 Pro)",
],
}
MODEL_PROVIDERS = [
"All",
"ElevenLabs",
"KlingAI",
"Mirelo",
"Ace",
"Alibaba",
"Dia",
"xAI",
"MiniMax",
"Inworld",
"Google",
"Fish",
]
@classmethod
def INPUT_TYPES(cls):
allModels = cls._getAllModels()
defaultModel = "elevenlabs:1@1 (ElevenLabs Multilingual v2)"
return {
"required": {
"Model Search": ("STRING", {
"tooltip": "Search For Specific Audio Model By Name Or Code (eg: elevenlabs, klingai).",
}),
"Model Provider": (cls.MODEL_PROVIDERS, {
"tooltip": "Choose Audio Model Provider To Filter Results.",
"default": "ElevenLabs",
}),
"AudioList": (allModels, {
"tooltip": "Audio Model Results Will Show UP Here So You Could Choose From.",
"default": defaultModel,
}),
"Use Search Value": ("BOOLEAN", {
"tooltip": "When Enabled, the value you've set in the search input will be used instead.\n\nThis is useful in case the model search API is down or you prefer to set the model manually.",
"default": False,
"label_on": "Enabled",
"label_off": "Disabled",
}),
}
}
@classmethod
def _getAllModels(cls):
"""Get all models from all providers"""
allModels = []
for models in cls.AUDIO_MODELS.values():
allModels.extend(models)
return allModels
RETURN_TYPES = ("RUNWAREAUDIOMODEL",)
RETURN_NAMES = ("model",)
FUNCTION = "searchModels"
CATEGORY = "Runware"
DESCRIPTION = "Directly Search and Connect Audio Models to Runware Audio Inference Nodes In ComfyUI."
@classmethod
def VALIDATE_INPUTS(cls, AudioList):
return True
def searchModels(self, **kwargs):
"""Search and return audio model"""
enableSearchValue = kwargs.get("Use Search Value", False)
searchInput = kwargs.get("Model Search")
if enableSearchValue:
modelAirCode = searchInput
else:
currentModel = kwargs.get("AudioList")
modelAirCode = currentModel.split(" (")[0]
return (modelAirCode,)