mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-21 12:42:11 -03:00
0.68
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# 🔗 Comfyui : Bjornulf_custom_nodes v0.67 🔗
|
# 🔗 Comfyui : Bjornulf_custom_nodes v0.68 🔗
|
||||||
|
|
||||||
A list of 120 custom nodes for Comfyui : Display, manipulate, create and edit text, images, videos, loras, generate characters and more.
|
A list of 120 custom nodes for Comfyui : Display, manipulate, create and edit text, images, videos, loras, generate characters and more.
|
||||||
You can manage looping operations, generate randomized content, trigger logical conditions, pause and manually control your workflows and even work with external AI tools, like Ollama or Text To Speech.
|
You can manage looping operations, generate randomized content, trigger logical conditions, pause and manually control your workflows and even work with external AI tools, like Ollama or Text To Speech.
|
||||||
@@ -362,6 +362,7 @@ cd /where/you/installed/ComfyUI && python main.py
|
|||||||
- **0.65**: ❗Breaking changes : Combine Text inputs are now all optional (PLease remake your nodes, sorry.) Add 6 new nodes : any2int, any2float, load text from folder, load text from path, load lora from path. Also upgraded the Save text node.
|
- **0.65**: ❗Breaking changes : Combine Text inputs are now all optional (PLease remake your nodes, sorry.) Add 6 new nodes : any2int, any2float, load text from folder, load text from path, load lora from path. Also upgraded the Save text node.
|
||||||
- **0.66**: Add lora hunyuan CIVIT ai + download, add TTS configuration node, edit requirements.txt
|
- **0.66**: Add lora hunyuan CIVIT ai + download, add TTS configuration node, edit requirements.txt
|
||||||
- **0.67**: Add kokoro TTS node.
|
- **0.67**: Add kokoro TTS node.
|
||||||
|
- **0.68**: Update kokoro TTS node with connect_to_workflow and same outputs as XTTS.
|
||||||
|
|
||||||
# 📝 Nodes descriptions
|
# 📝 Nodes descriptions
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "bjornulf_custom_nodes"
|
name = "bjornulf_custom_nodes"
|
||||||
description = "120 ComfyUI nodes : Display, manipulate, and edit text, images, videos, loras, generate characters and more. Manage looping operations, generate randomized content, use logical conditions and work with external AI tools, like Ollama or Text To Speech Kokoro, etc..."
|
description = "120 ComfyUI nodes : Display, manipulate, and edit text, images, videos, loras, generate characters and more. Manage looping operations, generate randomized content, use logical conditions and work with external AI tools, like Ollama or Text To Speech Kokoro, etc..."
|
||||||
version = "0.67"
|
version = "0.68"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 50 KiB |
@@ -2,6 +2,10 @@ import os
|
|||||||
import requests
|
import requests
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
class Everything(str):
|
||||||
|
def __ne__(self, __value: object) -> bool:
|
||||||
|
return False
|
||||||
|
|
||||||
VOICE_OPTIONS = {
|
VOICE_OPTIONS = {
|
||||||
"af_bella": "Bella (American Female) - af_bella",
|
"af_bella": "Bella (American Female) - af_bella",
|
||||||
"af_nicole": "Nicole (American Female) - af_nicole",
|
"af_nicole": "Nicole (American Female) - af_nicole",
|
||||||
@@ -61,16 +65,20 @@ class KokoroTTS:
|
|||||||
"save_audio": ("BOOLEAN", {"default": True}),
|
"save_audio": ("BOOLEAN", {"default": True}),
|
||||||
"overwrite": ("BOOLEAN", {"default": False}),
|
"overwrite": ("BOOLEAN", {"default": False}),
|
||||||
"seed": ("INT", {"default": 0}),
|
"seed": ("INT", {"default": 0}),
|
||||||
|
},
|
||||||
|
"optional": {
|
||||||
|
"connect_to_workflow": (Everything("*"), {"forceInput": True}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_TYPES = ("AUDIO",)
|
RETURN_TYPES = ("AUDIO", "STRING", "STRING", "FLOAT")
|
||||||
|
RETURN_NAMES = ("AUDIO", "audio_path", "audio_full_path", "audio_duration")
|
||||||
FUNCTION = "generate_audio"
|
FUNCTION = "generate_audio"
|
||||||
CATEGORY = "Bjornulf/Kokoro"
|
CATEGORY = "Bjornulf/Kokoro"
|
||||||
|
|
||||||
def generate_audio(self, text: str, voice: str, language: str, speed: float,
|
def generate_audio(self, text: str, voice: str, language: str, speed: float,
|
||||||
autoplay: bool, save_audio: bool,
|
autoplay: bool, save_audio: bool,
|
||||||
overwrite: bool, seed: int):
|
overwrite: bool, seed: int, connect_to_workflow: any = None):
|
||||||
random.seed(seed)
|
random.seed(seed)
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@@ -138,8 +146,8 @@ class KokoroTTS:
|
|||||||
|
|
||||||
audio_tensor = torch.from_numpy(samples).unsqueeze(0)
|
audio_tensor = torch.from_numpy(samples).unsqueeze(0)
|
||||||
audio_output = {"waveform": audio_tensor.unsqueeze(0), "sample_rate": sample_rate}
|
audio_output = {"waveform": audio_tensor.unsqueeze(0), "sample_rate": sample_rate}
|
||||||
return (audio_output,)
|
return (audio_output, save_path, full_path, len(samples) / sample_rate)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error in Kokoro TTS: {e}")
|
print(f"Error in Kokoro TTS: {e}")
|
||||||
return ({"waveform": torch.zeros(1, 1, 1), "sample_rate": 22050},)
|
return ({"waveform": torch.zeros(1, 1, 1), "sample_rate": 22050}, "", "", 0.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user