Add files via upload
+340 · 10 files changed
-
README.md+4 −0 -
icon.pngbinary -
install.js+47 −0 -
link.js+10 −0 -
pinokio.js+101 −0 -
pinokio_meta.json+4 −0 -
reset.js+8 −0 -
start.js+35 −0 -
torch.js+117 −0 -
update.js+14 −0
@@ -0,0 +1,4 @@ +# chatterbox + +A pinokio script for https://github.com/SUP3RMASS1VE/chatterbox-SUP3R + Binary files /dev/null and b/icon.png differ @@ -0,0 +1,47 @@ +module.exports = { + run: [ + // Edit this step to customize the git repository to use + { + method: "shell.run", + params: { + message: [ + "git clone https://github.com/SUP3RMASS1VE/chatterbox-SUP3R app", + ] + } + }, + // Delete this step if your project does not use torch + { + method: "script.start", + params: { + uri: "torch.js", + params: { + venv: "env", // Edit this to customize the venv folder path + path: "app", // Edit this to customize the path to start the shell from + // xformers: true // uncomment this line if your project requires xformers + // triton: true // uncomment this line if your project requires triton + // sageattention: true // uncomment this line if your project requires sageattention + } + } + }, + // Edit this step with your custom install commands + { + method: "shell.run", + params: { + venv: "env", // Edit this to customize the venv folder path + path: "app", // Edit this to customize the path to start the shell from + message: [ + "uv pip install gradio devicetorch", + "uv pip install -r requirements.txt" + ] + } + }, + { + method: "hf.download", + params: { + path: "app", + "_": [ "ResembleAI/chatterbox" ], + "include": '"*.json" "*pt"', + } + } + ] +} @@ -0,0 +1,10 @@ +module.exports = { + run: [ + { + method: "fs.link", + params: { + venv: "app/env" + } + } + ] +} @@ -0,0 +1,101 @@ +const path = require('path') +module.exports = { + version: "3.7", + title: "chatterbox", + description: "SoTA open-source TTS", + icon: "icon.png", + menu: async (kernel, info) => { + let installed = info.exists("app/env") + let running = { + install: info.running("install.js"), + start: info.running("start.js"), + update: info.running("update.js"), + reset: info.running("reset.js"), + link: info.running("link.js") + } + if (running.install) { + return [{ + default: true, + icon: "fa-solid fa-plug", + text: "Installing", + href: "install.js", + }] + } else if (installed) { + if (running.start) { + let local = info.local("start.js") + if (local && local.url) { + return [{ + default: true, + icon: "fa-solid fa-rocket", + text: "Open Web UI", + href: local.url, + }, { + icon: 'fa-solid fa-terminal', + text: "Terminal", + href: "start.js", + }] + } else { + return [{ + default: true, + icon: 'fa-solid fa-terminal', + text: "Terminal", + href: "start.js", + }] + } + } else if (running.update) { + return [{ + default: true, + icon: 'fa-solid fa-terminal', + text: "Updating", + href: "update.js", + }] + } else if (running.reset) { + return [{ + default: true, + icon: 'fa-solid fa-terminal', + text: "Resetting", + href: "reset.js", + }] + } else if (running.link) { + return [{ + default: true, + icon: 'fa-solid fa-terminal', + text: "Deduplicating", + href: "link.js", + }] + } else { + return [{ + default: true, + icon: "fa-solid fa-power-off", + text: "Start", + href: "start.js", + }, { + icon: "fa-solid fa-plug", + text: "Update", + href: "update.js", + }, { + icon: "fa-solid fa-plug", + text: "Install", + href: "install.js", + }, { + icon: "fa-solid fa-file-zipper", + text: "<div><strong>Save Disk Space</strong><div>Deduplicates redundant library files</div></div>", + href: "link.js", + }, { + icon: "fa-regular fa-circle-xmark", + text: "<div><strong>Reset</strong><div>Revert to pre-install state</div></div>", + href: "reset.js", + confirm: "Are you sure you wish to reset the app?" + + }] + } + } else { + return [{ + default: true, + icon: "fa-solid fa-plug", + text: "Install", + href: "install.js", + }] + } + } +} @@ -0,0 +1,4 @@ +{ + "links": [], + "posts": [] +} \ No newline at end of file @@ -0,0 +1,8 @@ +module.exports = { + run: [{ + method: "fs.rm", + params: { + path: "app" + } + }] +} @@ -0,0 +1,35 @@ +module.exports = { + daemon: true, + run: [ + { + method: "shell.run", + params: { + venv: "env", // Edit this to customize the venv folder path + env: { }, // Edit this to customize environment variables (see documentation) + path: "app", // Edit this to customize the path to start the shell from + message: [ + "python app.py", // Edit with your custom commands + ], + on: [{ + // The regular expression pattern to monitor. + // When this pattern occurs in the shell terminal, the shell will return, + // and the script will go onto the next step. + "event": "/http:\/\/\\S+/", + + // "done": true will move to the next step while keeping the shell alive. + // "kill": true will move to the next step after killing the shell. + "done": true + }] + } + }, + { + // This step sets the local variable 'url'. + // This local variable will be used in pinokio.js to display the "Open WebUI" tab when the value is set. + method: "local.set", + params: { + // the input.event is the regular expression match object from the previous step + url: "{{input.event[0]}}" + } + } + ] +} @@ -0,0 +1,117 @@ +module.exports = { + run: [ + // windows nvidia 50 series + { + "when": "{{platform === 'win32' && gpu === 'nvidia' && kernel.gpus && kernel.gpus.find(x => / 50.+/.test(x.model))}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": [ + 'uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128', + "{{args && args.triton ? 'uv pip install -U --pre triton-windows' : ''}}", + "{{args && args.sageattention ? 'uv pip install https://github.com/woct0rdho/SageAttention/releases/download/v2.1.1-windows/sageattention-2.1.1+cu128torch2.7.0-cp310-cp310-win_amd64.whl' : ''}}", + ] + }, + "next": null + }, + // windows nvidia + { + "when": "{{platform === 'win32' && gpu === 'nvidia'}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": [ + "uv pip install torch torchvision torchaudio {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu124", + "{{args && args.triton ? 'uv pip install -U triton-windows --force-reinstall' : ''}}", + "{{args && args.sageattention ? 'uv pip install https://github.com/deepbeepmeep/SageAttention/raw/refs/heads/main/releases/sageattention-2.1.0-cp310-cp310-win_amd64.whl --force-reinstall' : ''}}" + ] + }, + "next": null + }, + // windows amd + { + "when": "{{platform === 'win32' && gpu === 'amd'}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": "uv pip install torch-directml torchaudio torchvision numpy==1.26.4" + }, + "next": null + }, + // windows cpu + { + "when": "{{platform === 'win32' && (gpu !== 'nvidia' && gpu !== 'amd')}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": "uv pip install torch torchvision torchaudio numpy==1.26.4" + }, + "next": null + }, + // mac + { + "when": "{{platform === 'darwin'}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": "uv pip install torch torchvision torchaudio" + }, + "next": null + }, + // linux nvidia 50 series + { + "when": "{{platform === 'linux' && gpu === 'nvidia' && kernel.gpus && kernel.gpus.find(x => / 50.+/.test(x.model))}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": [ + 'uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128', + "{{args && args.sageattention ? 'uv pip install git+https://github.com/thu-ml/SageAttention.git' : ''}}" + ] + }, + "next": null + }, + // linux nvidia + { + "when": "{{platform === 'linux' && gpu === 'nvidia'}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": [ + "uv pip install torch torchvision torchaudio {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu124", + "{{args && args.sageattention ? 'uv pip install git+https://github.com/thu-ml/SageAttention.git' : ''}}" + ] + }, + "next": null + }, + // linux rocm (amd) + { + "when": "{{platform === 'linux' && gpu === 'amd'}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": "uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2.4" + }, + "next": null + }, + // linux cpu + { + "when": "{{platform === 'linux' && (gpu !== 'amd' && gpu !=='nvidia')}}", + "method": "shell.run", + "params": { + "venv": "{{args && args.venv ? args.venv : null}}", + "path": "{{args && args.path ? args.path : '.'}}", + "message": "uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu" + }, + "next": null + } + ] +} @@ -0,0 +1,14 @@ +module.exports = { + run: [{ + method: "shell.run", + params: { + message: "git pull" + } + }, { + method: "shell.run", + params: { + path: "app", + message: "git pull" + } + }] +}