refactored node mappings

This commit is contained in:
SayanoAI
2024-08-23 18:26:13 -04:00
parent a2e2cec4c4
commit 460f64dfed
3 changed files with 37 additions and 18 deletions
+15 -1
View File
@@ -208,6 +208,20 @@ class RVCNode:
preview_file = os.path.join(tempdir,audio_name)
if not os.path.isfile(preview_file): shutil.copyfile(cache_name,preview_file)
return {"ui": {"preview": [{"filename": audio_name, "type": "temp", "subfolder": "preview", "widgetId": widgetId}]}, "result": (lambda:audio_to_bytes(*output_audio),)}
# A dictionary that contains all nodes you want to export with their names
# NOTE: names should be globally unique
NODE_CLASS_MAPPINGS = {
"LoadRVCModelNode": LoadRVCModelNode,
"RVCNode": RVCNode,
"LoadHubertModel": LoadHubertModel,
"LoadPitchExtractionParams": LoadPitchExtractionParams,
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"LoadRVCModelNode": "🌺Load RVC Model",
"RVCNode": "🌺Voice Changer",
"LoadHubertModel": "🌺Load Hubert Model",
"LoadPitchExtractionParams": "🌺Load Pitch Extraction Params",
}
+16 -1
View File
@@ -365,4 +365,19 @@ class BatchedTranscriptionEncoderNode:
print(f"{duration_list=}")
print(f"{num_chunks=}, {max_chunks=}, {num_frames=}")
return (conditioning, batch_prompt_text, list(map(int,duration_list)), num_chunks, num_frames, text_list)
return (conditioning, batch_prompt_text, list(map(int,duration_list)), num_chunks, num_frames, text_list)
# A dictionary that contains all nodes you want to export with their names
# NOTE: names should be globally unique
NODE_CLASS_MAPPINGS = {
"AudioTranscriptionNode": AudioTranscriptionNode,
"LoadWhisperModelNode": LoadWhisperModelNode,
"BatchedTranscriptionEncoderNode": BatchedTranscriptionEncoderNode
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"AudioTranscriptionNode": "🌺Transcribe Audio",
"LoadWhisperModelNode": "🌺Load Whisper Model",
"BatchedTranscriptionEncoderNode": "🌺Batched CLIP Transcription Encode (Prompt)",
}