diff --git a/README.md b/README.md index 75d1be6..7ce67ca 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ A custom node for ComfyUI that generates high-quality, natural-sounding speech u I tried all the other Orpheus nodes for ComfyUI, and they were either slow (2+min for 15s), or I couldn't get them to install right. Unlike those, this doesn't try to run the LLM model with all the different settings via some cli thing, I just rely on LM Studio where you can handle all the loading there. I got this to be as fast as I could, about 0.5x realtime on a RTX3090. Voices sound so good. +![Workflow Diagram](./example_workflows/OrpheusTTSLMStudioExample.png) + + And now for your regularly scheduled LLM generated readme: This node is designed for performance and user experience, featuring a highly-responsive, parallelized workflow. It streams audio tokens from LM Studio while decoding them into sound in a separate thread, ensuring your ComfyUI interface remains smooth. The state-of-the-art progress bar intelligently displays the real-time progress of the entire operation, not just one part of it. @@ -36,12 +39,12 @@ This node is designed for performance and user experience, featuring a highly-re ``` 2. Clone this repository: ```bash - git clone https://github.com/phazei/ComfyUI-Orpheus-LMStudio.git + git clone https://github.com/phazei/ComfyUI-OrpheusTTS-LMStudio.git ``` *(Note: Replace the URL with your actual repository URL after publishing.)* 3. Install the required Python packages: ```bash - cd ComfyUI-Orpheus-LMStudio + cd ComfyUI-OrpheusTTS-LMStudio pip install -r requirements.txt ``` *(You should create a `requirements.txt` file in your repo with the following content:)* @@ -63,7 +66,7 @@ This node is designed for performance and user experience, featuring a highly-re ### 2. In ComfyUI -1. **Add the Node:** Right-click on your graph, select "Add Node," and find the **Orpheus/LM Studio > Orpheus TTS (LM Studio)** node. +1. **Add the Node:** Right-click on your graph, select "Add Node," and find the **OrpheusTTS/LM Studio > Orpheus TTS (LM Studio)** node. 2. **Enter Your Text:** Type the text you want to convert to speech in the `text` field. 3. **Select a Voice:** Choose one of the built-in English voices from the `voice` dropdown. 4. **Set the Model Key (Optional but Recommended):** diff --git a/__init__.py b/__init__.py index 8eb525e..7b1baaf 100644 --- a/__init__.py +++ b/__init__.py @@ -1,3 +1,3 @@ -from .node.orpheus_lmstudio_tts import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS +from .node.orpheustts_lmstudio import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS __all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"] diff --git a/example_workflows/OrpheusTTSLMStudioExample.json b/example_workflows/OrpheusTTSLMStudioExample.json new file mode 100644 index 0000000..49834aa --- /dev/null +++ b/example_workflows/OrpheusTTSLMStudioExample.json @@ -0,0 +1 @@ +{"id":"5568a751-0850-4c34-99b6-ebc18de74bee","revision":0,"last_node_id":139,"last_link_id":204,"nodes":[{"id":75,"type":"SetNode","pos":[-1554.4298095703125,590.0590209960938],"size":[210,60],"flags":{"collapsed":true},"order":14,"mode":0,"inputs":[{"name":"FLOAT","type":"FLOAT","link":132}],"outputs":[{"name":"*","type":"*","links":null}],"title":"Set_seconds","properties":{"previousName":"seconds","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["seconds"],"color":"#232","bgcolor":"#353"},{"id":81,"type":"SetNode","pos":[-1572.8175048828125,970.439208984375],"size":[210,60],"flags":{"collapsed":true},"order":20,"mode":0,"inputs":[{"name":"STRING","type":"STRING","link":186}],"outputs":[{"name":"*","type":"*","links":null}],"title":"Set_promptForLLM","properties":{"previousName":"promptForLLM","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["promptForLLM"]},{"id":96,"type":"Note","pos":[-2250.4619140625,613.6654052734375],"size":[350.830322265625,88.49740600585938],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[],"properties":{"ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["For LLM \"Enable LLM Prompting\" and \"USE LLM\" must both be set to true."],"color":"#432","bgcolor":"#653"},{"id":99,"type":"SetNode","pos":[-1533.1541748046875,403.4300231933594],"size":[210,60],"flags":{"collapsed":true},"order":22,"mode":0,"inputs":[{"name":"INT","type":"INT","link":153}],"outputs":[{"name":"*","type":"*","links":null}],"title":"Set_seed","properties":{"previousName":"seed","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["seed"],"color":"#1b4669","bgcolor":"#29699c"},{"id":74,"type":"FloatConstant","pos":[-1816.1380615234375,560.3070068359375],"size":[210,58],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"FLOAT","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"value","name":"value","type":"FLOAT","slot_index":0,"links":[132]}],"title":"Length in Seconds","properties":{"cnr_id":"comfyui-kjnodes","ver":"0addfc6101f7a834c7fb6e0a1b26529360ab5350","Node name for S&R":"FloatConstant","ue_properties":{"version":"7.0.1","widget_ue_connectable":{"value":true}}},"widgets_values":[120.00000000000003],"color":"#232","bgcolor":"#353"},{"id":92,"type":"GetNode","pos":[-929.2032470703125,382.5810546875],"size":[210,60],"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[{"name":"AUDIO","type":"AUDIO","links":[146,147]}],"title":"Get_results","properties":{"ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["results"]},{"id":57,"type":"GetNode","pos":[109.94898986816406,576.4002685546875],"size":[241.0567169189453,77.5213623046875],"flags":{"collapsed":true},"order":3,"mode":2,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[118]}],"title":"Get_promptForLLM","properties":{"ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["promptForLLM"]},{"id":52,"type":"SetNode","pos":[-179.1215057373047,269.2598571777344],"size":[210,58],"flags":{"collapsed":true},"order":17,"mode":2,"inputs":[{"name":"STRING","type":"STRING","link":117}],"outputs":[{"name":"*","type":"*","links":[]}],"title":"Set_LLM_SystemPrompt","properties":{"previousName":"","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["LLM_SystemPrompt"]},{"id":54,"type":"Note","pos":[111.41651916503906,369.71575927734375],"size":[281.55120849609375,125.26969909667969],"flags":{},"order":4,"mode":2,"inputs":[],"outputs":[],"properties":{"ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["Use any kind of LLM node for prompt enhancement.\n\nOnly LMStudio is built into the flow. If you want to use remote LLM's that require a key, switch it with the above."],"color":"#432","bgcolor":"#653"},{"id":124,"type":"RegexReplace","pos":[1010,680],"size":[400,292],"flags":{"collapsed":true},"order":27,"mode":2,"inputs":[{"localized_name":"string","name":"string","type":"STRING","widget":{"name":"string"},"link":203},{"localized_name":"regex_pattern","name":"regex_pattern","type":"STRING","widget":{"name":"regex_pattern"},"link":null},{"localized_name":"replace","name":"replace","type":"STRING","widget":{"name":"replace"},"link":null},{"localized_name":"case_insensitive","name":"case_insensitive","shape":7,"type":"BOOLEAN","widget":{"name":"case_insensitive"},"link":null},{"localized_name":"multiline","name":"multiline","shape":7,"type":"BOOLEAN","widget":{"name":"multiline"},"link":null},{"localized_name":"dotall","name":"dotall","shape":7,"type":"BOOLEAN","widget":{"name":"dotall"},"link":null},{"localized_name":"count","name":"count","shape":7,"type":"INT","widget":{"name":"count"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[188]}],"title":"Regex Replace Think","properties":{"cnr_id":"comfy-core","ver":"0.3.50","Node name for S&R":"RegexReplace","ue_properties":{"version":"7.0.1","widget_ue_connectable":{"string":true,"regex_pattern":true,"replace":true,"case_insensitive":true,"multiline":true,"dotall":true,"count":true}}},"widgets_values":["","[\\s\\S]*?[\\s]*","",true,false,false,0]},{"id":110,"type":"SetNode","pos":[700,1240],"size":[210,60],"flags":{"collapsed":true},"order":24,"mode":0,"inputs":[{"name":"AUDIO","type":"AUDIO","link":200}],"outputs":[{"name":"*","type":"*","links":null}],"title":"Set_results","properties":{"previousName":"results","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["results"]},{"id":58,"type":"Expo Lmstudio Unified","pos":[106.2405014038086,623.9006958007812],"size":[311.8914489746094,298],"flags":{},"order":18,"mode":2,"inputs":[{"localized_name":"image","name":"image","shape":7,"type":"IMAGE","link":null},{"localized_name":"text_input","name":"text_input","type":"STRING","widget":{"name":"text_input"},"link":118},{"localized_name":"system_prompt","name":"system_prompt","type":"STRING","widget":{"name":"system_prompt"},"link":119},{"localized_name":"model_key","name":"model_key","type":"STRING","widget":{"name":"model_key"},"link":null},{"localized_name":"auto_unload","name":"auto_unload","type":"COMBO","widget":{"name":"auto_unload"},"link":null},{"localized_name":"unload_delay","name":"unload_delay","type":"INT","widget":{"name":"unload_delay"},"link":null},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name":"seed"},"link":null},{"localized_name":"max_tokens","name":"max_tokens","shape":7,"type":"INT","widget":{"name":"max_tokens"},"link":null},{"localized_name":"temperature","name":"temperature","shape":7,"type":"FLOAT","widget":{"name":"temperature"},"link":null},{"localized_name":"debug","name":"debug","shape":7,"type":"BOOLEAN","widget":{"name":"debug"},"link":null},{"localized_name":"timeout_seconds","name":"timeout_seconds","shape":7,"type":"INT","widget":{"name":"timeout_seconds"},"link":null}],"outputs":[{"localized_name":"Generated Text","name":"Generated Text","type":"STRING","links":[202]}],"properties":{"cnr_id":"comfyui-lmstudio-image-to-text-node","ver":"1.1.14","Node name for S&R":"Expo Lmstudio Unified","ue_properties":{"version":"7.0.1","widget_ue_connectable":{"text_input":true,"system_prompt":true,"model_key":true,"auto_unload":true,"unload_delay":true,"seed":true,"max_tokens":true,"temperature":true,"debug":true}}},"widgets_values":["give me a prompt for an image generation","You are a helpful AI assistant.","amoral-gemma3-12b-v2-qat","True",0,867797198447769,"increment",1500,1,false,300]},{"id":87,"type":"GetNode","pos":[-1812.2860107421875,970.439208984375],"size":[210,58],"flags":{"collapsed":true},"order":5,"mode":0,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[139]}],"title":"Get_LLMResponsePrompt","properties":{"ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["LLMResponsePrompt"]},{"id":59,"type":"SetNode","pos":[1008.73291015625,787.1309814453125],"size":[210,58],"flags":{"collapsed":false},"order":28,"mode":2,"inputs":[{"name":"STRING","type":"STRING","link":188}],"outputs":[{"name":"*","type":"*","links":[]}],"title":"Set_LLMResponsePrompt","properties":{"previousName":"LLMResponsePrompt","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["LLMResponsePrompt"]},{"id":82,"type":"SetNode","pos":[-970,1300],"size":[210,58],"flags":{"collapsed":true},"order":25,"mode":0,"inputs":[{"name":"STRING","type":"STRING","link":144}],"outputs":[{"name":"*","type":"*","links":null}],"title":"Set_finalPrompt","properties":{"previousName":"finalPrompt","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["finalPrompt"]},{"id":56,"type":"StringConstantMultiline","pos":[-419.8678894042969,324.82183837890625],"size":[437.40850830078125,567.3861083984375],"flags":{},"order":6,"mode":2,"inputs":[{"localized_name":"string","name":"string","type":"STRING","widget":{"name":"string"},"link":null},{"localized_name":"strip_newlines","name":"strip_newlines","type":"BOOLEAN","widget":{"name":"strip_newlines"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[117,119]}],"title":"Audio_PROMPT","properties":{"cnr_id":"comfyui-kjnodes","ver":"8ecf5cd05e0a1012087b0da90eea9a13674668db","Node name for S&R":"StringConstantMultiline","ue_properties":{"version":"7.0.1","widget_ue_connectable":{"string":true,"strip_newlines":true}}},"widgets_values":["You write single-speaker dialogue for Orpheus TTS.\n\nOUTPUT ONLY THE TEXT TO BE SPOKEN. No quotes. No speaker names. No explanations. No SSML. No tags except the allowed paralinguistic tokens.\n\nAllowed tokens (use sparingly, inline): \n\nStyle goals:\n- Conversational, natural prosody. Prefer contractions. Vary sentence length.\n- Control rhythm with punctuation: commas for short pauses, em dashes — for interruptions, ellipses … for hesitation.\n- Avoid lists, bulleting, or meta commentary. No parentheses unless they would naturally be spoken.\n- No , brackets, or any other angle-bracket tags.\n\nConstraints:\n- Produce exactly ONE utterance per request (1–3 sentences by default).\n- Keep any single sentence ≤ 25 words unless asked otherwise.\n- Language: {LANGUAGE} (default: English).\n- Tone/persona: {TONE}.\n- Topic/context: Explicit, raunchy, erotic dialogue for consensual adult content.\n- Target length: {LENGTH} ∈ {short≈4–7s | medium≈8–15s | long≈16–25s}. Match with brevity and sentence count.\n\nIf the user asks for multiple lines, still return ONE continuous utterance for a single speaker.\n\nExamples:\nThe way you're looking at me… it makes me want to forget this dinner and take you right here on the table.\n\nI've been dreaming about the sounds you make… that soft when you finally let go… I need to hear it again, right now.\n\n Just the thought of your mouth on me… I can't think straight—I need you, and I don't care who hears us.\n\nReturn only the final utterance that the voice will speak.",true]},{"id":109,"type":"GetNode","pos":[-80,1220],"size":[210,60],"flags":{"collapsed":false},"order":7,"mode":0,"inputs":[],"outputs":[{"name":"STRING","type":"STRING","links":[199]}],"title":"Get_finalPrompt","properties":{"ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["finalPrompt"]},{"id":19,"type":"SaveAudio","pos":[-927.1069946289062,517.0375366210938],"size":[273.3948669433594,132],"flags":{},"order":16,"mode":4,"inputs":[{"localized_name":"audio","name":"audio","type":"AUDIO","link":147},{"localized_name":"filename_prefix","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null},{"localized_name":"audioUI","name":"audioUI","type":"AUDIO_UI","widget":{"name":"audioUI"},"link":null}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.3.32","Node name for S&R":"SaveAudio","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":["audio/ComfyUI"]},{"id":136,"type":"Note","pos":[-210,1670],"size":[210,130],"flags":{},"order":8,"mode":0,"inputs":[],"outputs":[],"properties":{},"widgets_values":["orpheus-3b-0.1-ft\nbaddy_s3_exp_3"],"color":"#432","bgcolor":"#653"},{"id":72,"type":"PreviewAudio","pos":[-1140,760],"size":[440,90],"flags":{},"order":15,"mode":0,"inputs":[{"localized_name":"audio","name":"audio","type":"AUDIO","link":146},{"localized_name":"audioUI","name":"audioUI","type":"AUDIO_UI","widget":{"name":"audioUI"},"link":null}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.3.33","Node name for S&R":"PreviewAudio","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":[]},{"id":137,"type":"PreviewAny","pos":[-1070,1020],"size":[140,76],"flags":{},"order":26,"mode":0,"inputs":[{"localized_name":"source","name":"source","type":"*","link":201}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.3.55","Node name for S&R":"PreviewAny"},"widgets_values":[]},{"id":84,"type":"PromptStashSaver","pos":[-1780,1040],"size":[450,530],"flags":{},"order":21,"mode":0,"inputs":[{"localized_name":"text","name":"text","shape":7,"type":"STRING","link":139},{"localized_name":"use_input_text","name":"use_input_text","shape":7,"type":"BOOLEAN","widget":{"name":"use_input_text"},"link":193},{"localized_name":"prompt_text","name":"prompt_text","shape":7,"type":"STRING","widget":{"name":"prompt_text"},"link":null},{"localized_name":"save_as_key","name":"save_as_key","shape":7,"type":"STRING","widget":{"name":"save_as_key"},"link":null},{"localized_name":"load_saved","name":"load_saved","shape":7,"type":"COMBO","widget":{"name":"load_saved"},"link":null},{"localized_name":"prompt_lists","name":"prompt_lists","shape":7,"type":"COMBO","widget":{"name":"prompt_lists"},"link":null}],"outputs":[{"localized_name":"text","name":"text","type":"STRING","links":[144,201]}],"title":"ACE Prompt","properties":{"Node name for S&R":"PromptStashSaver","cnr_id":"confyui-node-prompt-stash-saver","ver":"a3272e33faeef37dc0d3985421e5429de6ccfc3b","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":[true,"","","None","songs"]},{"id":123,"type":"PrimitiveStringMultiline","pos":[-1800,710],"size":[400,200],"flags":{},"order":9,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"STRING","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[186]}],"title":"LLMPrompt (optional)","properties":{"cnr_id":"comfy-core","ver":"0.3.50","Node name for S&R":"PrimitiveStringMultiline","ue_properties":{"version":"7.0.1","widget_ue_connectable":{"value":true}}},"widgets_values":["a woman speaking"]},{"id":131,"type":"Fast Groups Muter (rgthree)","pos":[-2170,780],"size":[214.17538452148438,106],"flags":{},"order":10,"mode":0,"inputs":[],"outputs":[{"name":"OPT_CONNECTION","type":"*","links":null}],"properties":{"matchColors":"","matchTitle":"","showNav":true,"showAllGraphs":true,"sort":"position","customSortAlphabet":"","toggleRestriction":"default","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}}},{"id":89,"type":"BOOLConstant","pos":[-2188.80224609375,972.0960083007812],"size":[270,58],"flags":{},"order":11,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"BOOLEAN","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"value","name":"value","type":"BOOLEAN","links":[193]}],"title":"USE LLM","properties":{"cnr_id":"comfyui-kjnodes","ver":"1.0.9","Node name for S&R":"BOOLConstant","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":[false]},{"id":138,"type":"ShowText|pysssss","pos":[460,320],"size":[140,26],"flags":{},"order":23,"mode":2,"inputs":[{"localized_name":"text","name":"text","type":"STRING","link":202}],"outputs":[{"localized_name":"STRING","name":"STRING","shape":6,"type":"STRING","links":[203]}],"properties":{"cnr_id":"comfyui-custom-scripts","ver":"f2838ed5e59de4d73cde5c98354b87a8d3200190","Node name for S&R":"ShowText|pysssss"}},{"id":100,"type":"Seed (rgthree)","pos":[-1810.3095703125,367.35174560546875],"size":[210,130],"flags":{},"order":12,"mode":0,"inputs":[],"outputs":[{"dir":4,"name":"SEED","shape":3,"type":"INT","links":[153]}],"properties":{"cnr_id":"rgthree-comfy","ver":"aa6c75a30b3ee8f01d7c9f8b0a126cccdc90616a","ue_properties":{"version":"7.0.1","widget_ue_connectable":{}}},"widgets_values":[555555555,"","",""]},{"id":134,"type":"OrpheusTTSLMStudio","pos":[220,1290],"size":[400,424],"flags":{},"order":19,"mode":0,"inputs":[{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":199},{"localized_name":"voice","name":"voice","type":"COMBO","widget":{"name":"voice"},"link":null},{"localized_name":"model_key","name":"model_key","type":"STRING","widget":{"name":"model_key"},"link":null},{"localized_name":"max_tokens","name":"max_tokens","type":"INT","widget":{"name":"max_tokens"},"link":null},{"localized_name":"temperature","name":"temperature","type":"FLOAT","widget":{"name":"temperature"},"link":null},{"localized_name":"top_p","name":"top_p","type":"FLOAT","widget":{"name":"top_p"},"link":null},{"localized_name":"repeat_penalty","name":"repeat_penalty","type":"FLOAT","widget":{"name":"repeat_penalty"},"link":null},{"localized_name":"timeout_seconds","name":"timeout_seconds","type":"INT","widget":{"name":"timeout_seconds"},"link":null},{"localized_name":"auto_unload","name":"auto_unload","type":"COMBO","widget":{"name":"auto_unload"},"link":null},{"localized_name":"unload_delay","name":"unload_delay","type":"INT","widget":{"name":"unload_delay"},"link":null},{"localized_name":"stop_at_eot","name":"stop_at_eot","type":"BOOLEAN","widget":{"name":"stop_at_eot"},"link":null},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name":"seed"},"link":204},{"localized_name":"debug","name":"debug","type":"BOOLEAN","widget":{"name":"debug"},"link":null},{"localized_name":"custom_stop","name":"custom_stop","shape":7,"type":"STRING","widget":{"name":"custom_stop"},"link":null}],"outputs":[{"localized_name":"audio","name":"audio","type":"AUDIO","links":[200]}],"properties":{"Node name for S&R":"OrpheusTTSLMStudio"},"widgets_values":["Hello there. This should sound natural.","tara","baddy_s3_exp_3",4096,0.6,0.9,1.1,300,"False",0,true,5555555,"randomize",false,""]},{"id":139,"type":"GetNode","pos":[-80,1520],"size":[210,60],"flags":{},"order":13,"mode":0,"inputs":[],"outputs":[{"name":"INT","type":"INT","links":[204]}],"title":"Get_seed","properties":{},"widgets_values":["seed"],"color":"#1b4669","bgcolor":"#29699c"}],"links":[[117,56,0,52,0,"*"],[118,57,0,58,1,"STRING"],[119,56,0,58,2,"STRING"],[132,74,0,75,0,"*"],[139,87,0,84,0,"STRING"],[144,84,0,82,0,"*"],[146,92,0,72,0,"AUDIO"],[147,92,0,19,0,"AUDIO"],[153,100,0,99,0,"INT"],[186,123,0,81,0,"STRING"],[188,124,0,59,0,"STRING"],[193,89,0,84,1,"BOOLEAN"],[199,109,0,134,0,"STRING"],[200,134,0,110,0,"AUDIO"],[201,84,0,137,0,"*"],[202,58,0,138,0,"STRING"],[203,138,0,124,0,"STRING"],[204,139,0,134,11,"INT"]],"groups":[{"id":1,"title":"Model","bounding":[-490,1030,1491.8331298828125,922.70068359375],"color":"#3f789e","font_size":24,"flags":{}},{"id":2,"title":"LLM Prompting","bounding":[-490,120,1782.86767578125,873.6248779296875],"color":"#8A8","font_size":24,"flags":{}},{"id":4,"title":"Setup","bounding":[-1840,290,1302.7952880859375,1404.373291015625],"color":"#3f789e","font_size":24,"flags":{}}],"config":{},"extra":{"frontendVersion":"1.18.9","0246.VERSION":[0,0,4],"ue_links":[],"links_added_by_ue":[],"VHS_latentpreview":false,"VHS_latentpreviewrate":0,"VHS_MetadataImage":true,"VHS_KeepIntermediate":true,"ds":{"scale":0.9258286124577902,"offset":[1000.0016808825994,-837.8201063005216]}},"version":0.4} \ No newline at end of file diff --git a/example_workflows/OrpheusTTSLMStudioExample.png b/example_workflows/OrpheusTTSLMStudioExample.png new file mode 100644 index 0000000..88d1057 Binary files /dev/null and b/example_workflows/OrpheusTTSLMStudioExample.png differ diff --git a/node/orpheus_lmstudio_tts.py b/node/orpheustts_lmstudio.py similarity index 98% rename from node/orpheus_lmstudio_tts.py rename to node/orpheustts_lmstudio.py index 5725db7..0d68062 100644 --- a/node/orpheus_lmstudio_tts.py +++ b/node/orpheustts_lmstudio.py @@ -88,7 +88,7 @@ class SlidingRate: # --- Node --------------------------------------------------------------------- -class OrpheusLMStudioTTS: +class OrpheusTTSLMStudio: """ Streaming LM Studio with parallel SNAC decoding and a single progress bar that reflects the critical path (max of LLM vs SNAC). Detailed logs kept. @@ -495,8 +495,10 @@ class OrpheusLMStudioTTS: if debug: avg_wait = (total_wait_time / llm_frag_count) if llm_frag_count else 0.0 avg_proc = (total_proc_time / llm_frag_count) if llm_frag_count else 0.0 - p50_wait = _pct(wait_samples, 50); p95_wait = _pct(wait_samples, 95) - p50_proc = _pct(proc_samples, 50); p95_proc = _pct(proc_samples, 95) + p50_wait = _pct(wait_samples, 50) + p95_wait = _pct(wait_samples, 95) + p50_proc = _pct(proc_samples, 50) + p95_proc = _pct(proc_samples, 95) print("--- LLM Stream Granular ---") print(f" TTFF (loop): {first_fragment_rel or 0.0:.4f}s") @@ -519,5 +521,5 @@ class OrpheusLMStudioTTS: return (audio,) # Comfy registration -NODE_CLASS_MAPPINGS = {"OrpheusLMStudioTTS": OrpheusLMStudioTTS} -NODE_DISPLAY_NAME_MAPPINGS = {"OrpheusLMStudioTTS": "Orpheus TTS (LM Studio)"} +NODE_CLASS_MAPPINGS = {"OrpheusTTSLMStudio": OrpheusTTSLMStudio} +NODE_DISPLAY_NAME_MAPPINGS = {"OrpheusTTSLMStudio": "Orpheus TTS (LM Studio)"} diff --git a/node_list.json b/node_list.json index 2156d73..2739de7 100644 --- a/node_list.json +++ b/node_list.json @@ -1,3 +1,3 @@ { - "OrpheusLMStudioTTS": "Generate Orpheus TTS audio via LM Studio" + "OrpheusTTSLMStudio": "Generate Orpheus TTS audio via LM Studio" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 667c66b..995ab07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,14 @@ [project] -name = "ComfyUI-Orpheus-LMStudio" +name = "ComfyUI-OrpheusTTS-LMStudio" description = "Generate Orpheus TTS audio via LM Studio" -version = "1.0.0" +version = "1.0.1" license = {file = "LICENSE"} [project.urls] -Repository = "https://github.com/phazei/ComfyUI-Orpheus-LMStudio" +Repository = "https://github.com/phazei/ComfyUI-OrpheusTTS-LMStudio" # Used by Comfy Registry https://comfyregistry.org [tool.comfy] PublisherId = "phazei" -DisplayName = "ComfyUI-Orpheus-LMStudio" +DisplayName = "ComfyUI-OrpheusTTS-LMStudio" Icon = ""